1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| <script setup lang="ts">
| import { computed } from 'vue';
|
| import { cn } from '@vben-core/shared/utils';
|
| import { TabsTrigger, type TabsTriggerProps, useForwardProps } from 'radix-vue';
|
| const props = defineProps<{ class?: any } & TabsTriggerProps>();
|
| const delegatedProps = computed(() => {
| const { class: _, ...delegated } = props;
|
| return delegated;
| });
|
| const forwardedProps = useForwardProps(delegatedProps);
| </script>
|
| <template>
| <TabsTrigger
| v-bind="forwardedProps"
| :class="
| cn(
| 'ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow',
| props.class,
| )
| "
| >
| <slot></slot>
| </TabsTrigger>
| </template>
|
|