You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
459 B
Vue
16 lines
459 B
Vue
<script lang="ts" setup>
|
|
import { cn } from '@/lib/utils';
|
|
import { Primitive, type PrimitiveProps } from 'radix-vue';
|
|
import type { HTMLAttributes } from 'vue';
|
|
|
|
const props = withDefaults(defineProps<PrimitiveProps & { class?: HTMLAttributes['class'] }>(), {
|
|
as: 'a',
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<Primitive :as="as" :as-child="asChild" :class="cn('transition-colors hover:text-foreground', props.class)">
|
|
<slot />
|
|
</Primitive>
|
|
</template>
|