File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ const props = withDefaults(
2626
2727const el = useTemplateRef (' el' )
2828
29- const keyboardShortcuts = useKeyboardShortcuts ()
30- const keyboardShortcutsEnabled = computed (() => import .meta .client && keyboardShortcuts .value )
29+ const keyboardShortcutsEnabled = useKeyboardShortcuts ()
3130
3231defineExpose ({
3332 focus : () => el .value ?.focus (),
@@ -63,14 +62,12 @@ defineExpose({
6362 >
6463 <span v-if =" classicon" class =" size-[1em]" :class =" classicon" aria-hidden =" true" />
6564 <slot />
66- <ClientOnly >
67- <kbd
68- v-if =" keyboardShortcutsEnabled && ariaKeyshortcuts"
69- class =" ms-2 inline-flex items-center justify-center w-4 h-4 text-xs text-fg bg-bg-muted border border-border rounded no-underline"
70- aria-hidden =" true"
71- >
72- {{ ariaKeyshortcuts }}
73- </kbd >
74- </ClientOnly >
65+ <kbd
66+ v-if =" keyboardShortcutsEnabled && ariaKeyshortcuts"
67+ class =" ms-2 inline-flex items-center justify-center w-4 h-4 text-xs text-fg bg-bg-muted border border-border rounded no-underline"
68+ aria-hidden =" true"
69+ >
70+ {{ ariaKeyshortcuts }}
71+ </kbd >
7572 </button >
7673</template >
Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ const isLink = computed(() => props.variant === 'link')
5959const isButton = computed (() => ! isLink .value )
6060const isButtonSmall = computed (() => props .size === ' small' && ! isLink .value )
6161const isButtonMedium = computed (() => props .size === ' medium' && ! isLink .value )
62- const keyboardShortcuts = useKeyboardShortcuts ()
63- const keyboardShortcutsEnabled = computed (() => import .meta .client && keyboardShortcuts .value )
62+ const keyboardShortcutsEnabled = useKeyboardShortcuts ()
6463 </script >
6564
6665<template >
@@ -115,14 +114,12 @@ const keyboardShortcutsEnabled = computed(() => import.meta.client && keyboardSh
115114 class =" i-lucide:link size-[1em] opacity-0 group-hover/link:opacity-100 transition-opacity duration-200"
116115 aria-hidden =" true"
117116 />
118- <ClientOnly >
119- <kbd
120- v-if =" keyboardShortcutsEnabled && ariaKeyshortcuts"
121- class =" ms-2 inline-flex items-center justify-center size-4 text-xs text-fg bg-bg-muted border border-border rounded no-underline"
122- aria-hidden =" true"
123- >
124- {{ ariaKeyshortcuts }}
125- </kbd >
126- </ClientOnly >
117+ <kbd
118+ v-if =" keyboardShortcutsEnabled && ariaKeyshortcuts"
119+ class =" ms-2 inline-flex items-center justify-center size-4 text-xs text-fg bg-bg-muted border border-border rounded no-underline"
120+ aria-hidden =" true"
121+ >
122+ {{ ariaKeyshortcuts }}
123+ </kbd >
127124 </NuxtLink >
128125</template >
You can’t perform that action at this time.
0 commit comments