mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-08 04:19:25 +00:00
30 lines
774 B
Vue
30 lines
774 B
Vue
<script setup lang="ts">
|
|
import { type HTMLAttributes, computed } from "vue";
|
|
import { type NavigationMenuTriggerProps, useForwardProps } from "radix-vue";
|
|
|
|
const props = defineProps<
|
|
NavigationMenuTriggerProps & { class?: HTMLAttributes["class"] }
|
|
>();
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props;
|
|
|
|
return delegated;
|
|
});
|
|
|
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
</script>
|
|
|
|
<template>
|
|
<NavigationMenuTrigger
|
|
v-bind="forwardedProps"
|
|
:class="cn(navigationMenuTriggerStyle(), 'group', props.class)"
|
|
>
|
|
<slot />
|
|
<ChevronDownIcon
|
|
class="relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180"
|
|
aria-hidden="true"
|
|
/>
|
|
</NavigationMenuTrigger>
|
|
</template>
|