- Added stories for: Label, Skeleton, ScrollArea, Toast, Collapsible, Sidebar - Covered layout and feedback components
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { Collapsible, CollapsibleCard } from './collapsible';
|
|
import { Button } from './button';
|
|
import { Settings } from 'lucide-react';
|
|
|
|
const meta = {
|
|
title: 'UI/Collapsible',
|
|
component: Collapsible,
|
|
tags: ['autodocs'],
|
|
argTypes: {
|
|
defaultOpen: { control: 'boolean' },
|
|
showChevron: { control: 'boolean' },
|
|
open: { control: 'boolean' },
|
|
},
|
|
} satisfies Meta<typeof Collapsible>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
trigger: <h3 className="text-lg font-semibold p-2">Click to expand</h3>,
|
|
children: <div className="p-4 border border-kodo-steel rounded-md mt-2">Content hidden by default</div>,
|
|
},
|
|
};
|
|
|
|
export const CollapsibleCardExample: Story = {
|
|
render: () => (
|
|
<CollapsibleCard
|
|
title="Advanced Settings"
|
|
icon={<Settings className="w-4 h-4" />}
|
|
className="w-[400px]"
|
|
>
|
|
<div className="space-y-4">
|
|
<div className="text-sm text-kodo-content-dim">
|
|
Configure advanced options for your project.
|
|
</div>
|
|
<div className="flex justify-end">
|
|
<Button size="sm">Save Changes</Button>
|
|
</div>
|
|
</div>
|
|
</CollapsibleCard>
|
|
),
|
|
};
|