@@ -12,7 +12,7 @@ const props = withDefaults(
1212 * If you want a button use `TagButton` instead.
1313 * */
1414 type ?: never
15- variant ?: ' primary' | ' secondary'
15+ variant ?: ' primary' | ' secondary' | ' tag '
1616 } &
1717 /** This makes sure the link always has either `to` or `href` */
1818 (Required < Pick < NuxtLinkProps , ' to' >> | Required < Pick < NuxtLinkProps , ' href' >> ) &
@@ -23,16 +23,28 @@ const props = withDefaults(
2323 </script >
2424
2525<template >
26- <!-- This is only a placeholder implementation yet. It will probably need some additional styling, but note: A disabled link is just text. -->
27- <span v-if =" disabled" class =" opacity-50" ><slot /></span >
26+ <span
27+ v-if =" disabled"
28+ class =" opacity-50 inline-flex gap-x-1 items-center justify-center font-mono border border-border rounded-md"
29+ :class =" {
30+ 'text-sm px-4 py-2': variant !== 'tag',
31+ 'text-xs px-2 py-0.5': variant === 'tag',
32+ 'bg-bg-muted text-fg-muted': variant === 'tag',
33+ 'text-bg bg-fg': variant === 'primary',
34+ 'bg-transparent text-fg': variant === 'secondary',
35+ }"
36+ ><slot
37+ /></span >
2838 <NuxtLink
2939 v-else
30- class =" inline-flex gap-x-1 items-center justify-center px-4 py-2 font-mono text-sm border border-border rounded-md transition-all duration-200"
31- :class =" [
32- variant === 'primary'
33- ? 'text-bg bg-fg hover:enabled:(bg-fg/90)'
34- : 'bg-transparent text-fg hover:enabled:(bg-fg text-bg border-fg)',
35- ]"
40+ class =" cursor-pointer inline-flex gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 aria-current:(bg-fg text-bg border-fg hover:enabled:(text-bg/50))"
41+ :class =" {
42+ 'text-sm px-4 py-2': variant !== 'tag',
43+ 'text-xs px-2 py-0.5': variant === 'tag',
44+ 'bg-bg-muted text-fg-muted hover:(text-fg border-border-hover)': variant === 'tag',
45+ 'text-bg bg-fg hover:(bg-fg/90)': variant === 'primary',
46+ 'bg-transparent text-fg hover:(bg-fg text-bg border-fg)': variant === 'secondary',
47+ }"
3648 >
3749 <slot />
3850 </NuxtLink >
0 commit comments