learning_ai_common_plat/packages/ui/src/components/Card.stories.tsx
saravanakumardb1 11a832e271 feat(ui): add Storybook for @bytelyst/ui component library
- Storybook 8 with React Vite framework + a11y addon
- Stories for Button (7 variants), Badge (6), Input (5), Card (4)
- Dark/elevated/light background presets
- Run: pnpm --filter @bytelyst/ui storybook
2026-03-28 00:59:25 -07:00

39 lines
1.0 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/react';
import { Card, CardHeader, CardTitle, CardDescription } from './Card.js';
const meta: Meta<typeof Card> = {
title: 'Components/Card',
component: Card,
argTypes: {
padding: { control: 'select', options: ['none', 'sm', 'md', 'lg'] },
hover: { control: 'boolean' },
},
};
export default meta;
type Story = StoryObj<typeof Card>;
export const Default: Story = {
args: { children: 'Card content goes here' },
};
export const WithHeader: Story = {
render: args => (
<Card {...args}>
<CardHeader>
<CardTitle>Card Title</CardTitle>
<CardDescription>A short description of this card.</CardDescription>
</CardHeader>
<p style={{ color: 'var(--bl-text-secondary, #a0a0b0)', fontSize: 14 }}>Body content</p>
</Card>
),
};
export const Hoverable: Story = {
args: { hover: true, children: 'Hover me to see the border effect' },
};
export const LargePadding: Story = {
args: { padding: 'lg', children: 'Large padding card' },
};