feat(editor): Evaluation feature Phase one readiness (no-changelog) (#13383)

Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
Raúl Gómez Morales
2025-02-21 12:58:28 +01:00
committed by GitHub
parent 7bd83d7d33
commit b2293b7ad5
52 changed files with 2452 additions and 2255 deletions

View File

@@ -1,5 +1,7 @@
<script lang="ts" setup>
import type { ButtonType } from 'n8n-design-system';
import { N8nIconButton, N8nActionToggle } from 'n8n-design-system';
import { ref } from 'vue';
type Action = {
label: string;
@@ -9,24 +11,37 @@ type Action = {
defineProps<{
actions: Action[];
disabled?: boolean;
type?: ButtonType;
}>();
const emit = defineEmits<{
action: [id: string];
}>();
const actionToggleRef = ref<InstanceType<typeof N8nActionToggle> | null>(null);
defineExpose({
openActionToggle: (isOpen: boolean) => actionToggleRef.value?.openActionToggle(isOpen),
});
</script>
<template>
<div :class="[$style.buttonGroup]">
<slot></slot>
<N8nActionToggle
ref="actionToggleRef"
data-test-id="add-resource"
:actions="actions"
placement="bottom-end"
:teleported="false"
@action="emit('action', $event)"
>
<N8nIconButton :disabled="disabled" :class="[$style.buttonGroupDropdown]" icon="angle-down" />
<N8nIconButton
:disabled="disabled"
:class="[$style.buttonGroupDropdown]"
icon="angle-down"
:type="type ?? 'primary'"
/>
</N8nActionToggle>
</div>
</template>