mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-30 16:26:36 +08:00
66de566a00
* fix(frontend): left-align announcement logo in homepage banner * fix(frontend): keep multiselect panels floating and preserve summaries * fix(frontend): rebalance config card header spacing * fix(frontend): normalize formatting and fix multiselect modal behavior * fix(frontend): restore config divider spacing on desktop
65 lines
1.6 KiB
TypeScript
65 lines
1.6 KiB
TypeScript
import * as React from "react";
|
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
function Tabs({
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<typeof TabsPrimitive.Root>) {
|
|
return (
|
|
<TabsPrimitive.Root
|
|
className={cn("flex flex-col gap-2", className)}
|
|
data-slot="tabs"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function TabsList({
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<typeof TabsPrimitive.List>) {
|
|
return (
|
|
<TabsPrimitive.List
|
|
className={cn(
|
|
"inline-flex h-9 items-center justify-center rounded-lg bg-default-100 p-1 text-default-500",
|
|
className,
|
|
)}
|
|
data-slot="tabs-list"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function TabsTrigger({
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
|
|
return (
|
|
<TabsPrimitive.Trigger
|
|
className={cn(
|
|
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-default-50",
|
|
className,
|
|
)}
|
|
data-slot="tabs-trigger"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function TabsContent({
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<typeof TabsPrimitive.Content>) {
|
|
return (
|
|
<TabsPrimitive.Content
|
|
className={cn("outline-none", className)}
|
|
data-slot="tabs-content"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export { Tabs, TabsContent, TabsList, TabsTrigger };
|