| 6 | import { cn } from "@/lib/classnames"; |
| 7 | |
| 8 | function Tabs({ |
| 9 | className, |
| 10 | orientation = "horizontal", |
| 11 | ...props |
| 12 | }: React.ComponentProps<typeof TabsPrimitive.Root>) { |
| 13 | return ( |
| 14 | <TabsPrimitive.Root |
| 15 | data-slot='tabs' |
| 16 | data-orientation={orientation} |
| 17 | orientation={orientation} |
| 18 | className={cn( |
| 19 | "group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", |
| 20 | className |
| 21 | )} |
| 22 | {...props} |
| 23 | /> |
| 24 | ); |
| 25 | } |
| 26 | |
| 27 | const tabsListVariants = cva( |
| 28 | "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", |