| 5 | import { cn } from "../lib/utils"; |
| 6 | |
| 7 | function Tabs({ |
| 8 | className, |
| 9 | orientation = "horizontal", |
| 10 | ...props |
| 11 | }: React.ComponentProps<typeof TabsPrimitive.Root>) { |
| 12 | return ( |
| 13 | <TabsPrimitive.Root |
| 14 | data-slot="tabs" |
| 15 | data-orientation={orientation} |
| 16 | orientation={orientation} |
| 17 | className={cn("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", className)} |
| 18 | {...props} |
| 19 | /> |
| 20 | ); |
| 21 | } |
| 22 | |
| 23 | const tabsListVariants = cva( |
| 24 | "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none", |