2024-11-30 00:58:04 +01:00
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
import { Primitive, type PrimitiveProps } from "radix-vue";
|
|
|
|
|
import type { HTMLAttributes } from "vue";
|
2024-12-04 15:17:47 +01:00
|
|
|
import { NuxtLink } from "#components";
|
2024-11-30 00:58:04 +01:00
|
|
|
|
|
|
|
|
const props = withDefaults(
|
|
|
|
|
defineProps<PrimitiveProps & { class?: HTMLAttributes["class"] }>(),
|
|
|
|
|
{
|
2024-12-04 15:17:47 +01:00
|
|
|
as: NuxtLink,
|
2024-11-30 00:58:04 +01:00
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<Primitive
|
|
|
|
|
:as="as"
|
|
|
|
|
:as-child="asChild"
|
|
|
|
|
:class="cn('transition-colors hover:text-foreground', props.class)"
|
|
|
|
|
>
|
|
|
|
|
<slot />
|
|
|
|
|
</Primitive>
|
|
|
|
|
</template>
|