import type { Meta, StoryObj } from '@storybook/react-vite'; import { Tabs, TabsContent, TabsList, TabsTrigger } from './tabs'; const meta = { title: 'Components/Tabs', component: Tabs, parameters: { layout: 'centered', docs: { description: { component: 'Switches between sibling panels without leaving the page. Tabs are for alternate views of the same subject — if the panels are separate destinations, use links and routes so they can be shared and bookmarked.', }, }, }, tags: ['autodocs'], } satisfies Meta; export default meta; type Story = StoryObj; const panels = { overview: 'Traffic, conversion and revenue for the last 30 days.', activity: 'Everything that happened in this project recently.', settings: 'Project name, visibility and danger zone.', }; export const Default: Story = { render: () => ( Overview Activity Settings {Object.entries(panels).map(([value, text]) => ( {text} ))} ), }; /** The `line` variant reads better when the tab strip spans a full-width area. */ export const LineVariant: Story = { render: () => ( Overview Activity Settings {Object.entries(panels).map(([value, text]) => ( {text} ))} ), }; export const Vertical: Story = { render: () => ( Overview Activity Settings {Object.entries(panels).map(([value, text]) => ( {text} ))} ), }; export const WithDisabledTab: Story = { render: () => ( Overview Billing Billing is only available on paid plans. ), };