chore: allow preset override of components shortcuts (#139)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Sylvain Marroufin
2023-03-09 11:40:04 +01:00
committed by GitHub
parent 0826ef8d59
commit fef93f3198
3 changed files with 10 additions and 4 deletions

View File

@@ -11,7 +11,7 @@
{{ text }}
</slot>
<span v-if="shortcuts?.length" class="inline-flex items-center justify-end flex-shrink-0 gap-0.5 ml-1">
<span v-if="shortcuts?.length" :class="shortcutsClass">
<span class="mr-1 u-text-gray-700">&middot;</span>
<kbd v-for="shortcut of shortcuts" :key="shortcut" class="flex items-center justify-center font-sans px-1 h-4 min-w-[16px] text-[10px] u-bg-gray-100 rounded u-text-gray-900">
{{ shortcut }}
@@ -84,6 +84,10 @@ const props = defineProps({
type: Object as PropType<PopperOptions>,
default: () => ({})
},
shortcutsClass: {
type: Object,
default: () => $ui.tooltip.shortcuts
},
openDelay: {
type: Number,
default: 0