import type { Meta, StoryObj } from '@storybook/nextjs-vite'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '../components/ui/tabs'; const meta = { title: 'UI/Tabs', component: Tabs, parameters: { docs: { description: { component: 'Radix-based Tabs primitives. The default variant is legacy (deprecated — use `TabNavigation` in new code); `variant="admin-rail"` is the sanctioned ODS underline-tab styling for admin config surfaces: transparent list on a bordered scrollable rail, accent underline on the active trigger. Set the variant on BOTH `TabsList` and each `TabsTrigger`.', }, }, }, } satisfies Meta; export default meta; type Story = StoryObj; /** * Default (legacy) look — kept for un-migrated call sites. */ export const Default: Story = { render: () => ( Overview Settings History

Overview content.

Settings content.

History content.

), }; /** * The `admin-rail` variant: `TabsList variant="admin-rail"` self-wraps in the * bordered, horizontally-scrollable rail; triggers get the accent underline * when active and secondary → primary text on hover. Disabled tabs stay * visible but inert. */ export const AdminRail: Story = { render: () => ( Rules Repositories Runs Billing

Rule configuration lives here.

Repository bindings live here.

Sweep runs live here.

), }; /** * The rail scrolls horizontally when tabs overflow a narrow container — * the border stays full-width under the scrolled list. */ export const AdminRailOverflow: Story = { render: () => (
{['General', 'Data Sources', 'Executors', 'Prompts', 'Retrieval', 'Transcripts'].map((label, i) => ( {label} ))}

General settings.

), };