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