Line data Source code
1 16 : <script setup lang="ts">
2 : import { reactiveOmit } from '@vueuse/core'
3 : import type { TabsTriggerProps } from 'reka-ui'
4 : import { TabsTrigger, useForwardProps } from 'reka-ui'
5 : import type { HTMLAttributes } from 'vue'
6 :
7 : import { cn } from '@comfyorg/tailwind-utils'
8 :
9 : import type { TabsTriggerVariants } from './tabs.variants'
10 : import { tabsTriggerVariants } from './tabs.variants'
11 :
12 3428 : const props = defineProps<
13 : TabsTriggerProps & {
14 : class?: HTMLAttributes['class']
15 : variant?: TabsTriggerVariants['variant']
16 : }
17 : >()
18 3428 : const forwarded = useForwardProps(reactiveOmit(props, 'class', 'variant'))
19 : </script>
20 :
21 : <template>
22 : <TabsTrigger
23 : v-bind="forwarded"
24 : data-slot="tabs-trigger"
25 : :class="cn(tabsTriggerVariants({ variant: props.variant }), props.class)"
26 : >
27 : <slot />
28 : </TabsTrigger>
29 : </template>
|