veza/apps/web/src/components/ui/Skeleton.stories.tsx
senke ba5b8a9abd feat(storybook): expanded coverage for structural components (batch 4)
- Added stories for: Label, Skeleton, ScrollArea, Toast, Collapsible, Sidebar
- Covered layout and feedback components
2026-02-02 19:44:58 +01:00

58 lines
1.4 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/react';
import { Skeleton } from './skeleton';
const meta = {
title: 'UI/Skeleton',
component: Skeleton,
tags: ['autodocs'],
argTypes: {
variant: {
control: 'select',
options: ['text', 'circular', 'rectangular'],
},
width: { control: 'text' },
height: { control: 'text' },
},
} satisfies Meta<typeof Skeleton>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
args: {
width: 200,
height: 20,
},
};
export const CardLoading: Story = {
render: () => (
<div className="flex flex-col space-y-3 w-[300px]">
<Skeleton className="h-[125px] w-full rounded-xl" />
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton className="h-4 w-[200px]" />
</div>
</div>
),
};
export const AvatarLoading: Story = {
render: () => (
<div className="flex items-center space-x-4">
<Skeleton className="h-12 w-12 rounded-full" />
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton className="h-4 w-[200px]" />
</div>
</div>
),
};
export const Circular: Story = {
args: {
variant: 'circular',
width: 50,
height: 50,
},
};