feat(editor): Add node context menu (#7620)

![image](https://github.com/n8n-io/n8n/assets/8850410/5a601fae-cb8e-41bb-beca-ac9ab7065b75)
This commit is contained in:
Elias Meire
2023-11-20 14:37:12 +01:00
committed by GitHub
parent 4dbae0e2e9
commit 8d12c1ad8d
46 changed files with 1612 additions and 373 deletions

View File

@@ -0,0 +1,36 @@
<script setup lang="ts">
import type { Placement } from 'element-plus';
import type { KeyboardShortcut } from 'n8n-design-system/src/components/N8nKeyboardShortcut';
interface Props {
label: string;
shortcut: KeyboardShortcut;
placement?: Placement;
}
withDefaults(defineProps<Props>(), { placement: 'top' });
</script>
<template>
<n8n-tooltip :placement="placement" :show-after="500">
<template #content>
<div :class="$style.shortcut">
<div :class="$style.label">{{ label }}</div>
<n8n-keyboard-shortcut v-bind="shortcut"></n8n-keyboard-shortcut>
</div>
</template>
<slot />
</n8n-tooltip>
</template>
<style lang="scss" module>
.shortcut {
display: flex;
align-items: center;
font-size: var(--font-size-2xs);
gap: var(--spacing-2xs);
}
.label {
flex-shrink: 0;
}
</style>