38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs';
|
|
|
|
const meta = {
|
|
title: 'UI/Tabs',
|
|
component: Tabs,
|
|
tags: ['autodocs'],
|
|
argTypes: {
|
|
defaultValue: { control: 'text' },
|
|
},
|
|
args: {
|
|
defaultValue: 'account',
|
|
}
|
|
} satisfies Meta<typeof Tabs>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
render: (args) => (
|
|
<Tabs {...args} className="max-w-md">
|
|
<TabsList className="grid w-full grid-cols-2">
|
|
<TabsTrigger value="account">Account</TabsTrigger>
|
|
<TabsTrigger value="password">Password</TabsTrigger>
|
|
</TabsList>
|
|
<TabsContent value="account">
|
|
<div className="p-4 bg-muted/20 rounded-lg mt-2 border border-border/50">
|
|
<p className="text-sm font-medium">Make changes to your account here.</p>
|
|
</div>
|
|
</TabsContent>
|
|
<TabsContent value="password">
|
|
<div className="p-4 bg-muted/20 rounded-lg mt-2 border border-border/50">
|
|
<p className="text-sm font-medium">Change your password here.</p>
|
|
</div>
|
|
</TabsContent>
|
|
</Tabs>
|
|
),
|
|
};
|