diff --git a/apps/web/src/components/badge-tabs.tsx b/apps/web/src/components/badge-tabs.tsx index 5463bd0..208ef0e 100644 --- a/apps/web/src/components/badge-tabs.tsx +++ b/apps/web/src/components/badge-tabs.tsx @@ -1,6 +1,7 @@ import type { ComponentProps, ReactNode } from 'react' import { Tabs, TabsContent, TabsList, TabsTrigger } from '@evobgp/ui/components/tabs' +import { cn } from '@evobgp/ui/lib/utils' import { Badge } from '@/components/reui/badge' @@ -39,9 +40,15 @@ export function BadgeTabs({ value={value} defaultValue={defaultValue} onValueChange={onValueChange} - className={className} + className={cn('w-full', className)} > - + {items.map((item) => ( {item.icon} @@ -54,7 +61,7 @@ export function BadgeTabs({ ))} -
{children}
+
{children}
) } diff --git a/packages/ui/src/components/tabs.tsx b/packages/ui/src/components/tabs.tsx index 32979e5..ae4f136 100644 --- a/packages/ui/src/components/tabs.tsx +++ b/packages/ui/src/components/tabs.tsx @@ -13,7 +13,8 @@ function Tabs({ data-slot="tabs" data-orientation={orientation} className={cn( - "group/tabs flex gap-2 data-horizontal:flex-col", + "group/tabs flex gap-2", + orientation === "horizontal" ? "flex-col" : "flex-row", className )} {...props} @@ -22,7 +23,7 @@ function Tabs({ } const tabsListVariants = cva( - "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", + "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:h-auto data-[variant=line]:rounded-none data-[variant=line]:border-b data-[variant=line]:border-border data-[variant=line]:bg-transparent data-[variant=line]:p-0", { variants: { variant: { @@ -56,10 +57,11 @@ function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {