Skip to content

Commit 6c271b3

Browse files
committed
fix: cleanup component
1 parent c3aaa42 commit 6c271b3

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

app/components/Tag/Link.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import type { NuxtLinkProps } from '#app'
33
4-
const { current, disabled, ...props } = defineProps<
4+
const props = defineProps<
55
{
66
/** Disabled links will be displayed as plain text */
77
disabled?: boolean
@@ -25,12 +25,11 @@ const { current, disabled, ...props } = defineProps<
2525
<NuxtLink
2626
v-else
2727
class="inline-flex items-center px-2 py-0.5 text-xs font-mono border rounded transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-fg focus-visible:ring-offset-1"
28-
:class="{
29-
'bg-bg-muted text-fg-muted border-border hover:(text-fg border-border-hover)': !current,
30-
'bg-fg text-bg border-fg hover:(text-text-bg/50)': current,
31-
'opacity-50 cursor-not-allowed': disabled,
32-
}"
33-
v-bind="props"
28+
:class="
29+
current
30+
? 'bg-fg text-bg border-fg hover:(text-text-bg/50)'
31+
: 'bg-bg-muted text-fg-muted border-border hover:(text-fg border-border-hover)'
32+
"
3433
>
3534
<slot />
3635
</NuxtLink>

0 commit comments

Comments
 (0)