feat: storybook
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import type { Meta, StoryObj } from 'storybook-react-rsbuild';
|
||||
import { Select } from '../components/ui';
|
||||
|
||||
const items = [
|
||||
{ value: 'sequoia', label: 'Sequoia' },
|
||||
{ value: 'sonoma', label: 'Sonoma' },
|
||||
{ value: 'ventura', label: 'Ventura' },
|
||||
{ value: 'monterey', label: 'Monterey' },
|
||||
];
|
||||
|
||||
const meta = {
|
||||
title: 'Inputs/Select',
|
||||
component: Select,
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component:
|
||||
'Radix Select in the ModernSK skin. Pass `items` plus an optional `placeholder`; control it with `value` / `onValueChange` or leave it uncontrolled with `defaultValue`.',
|
||||
},
|
||||
},
|
||||
},
|
||||
args: { items, placeholder: 'Pick a release…', 'aria-label': 'macOS release' },
|
||||
} satisfies Meta<typeof Select>;
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Playground: Story = {};
|
||||
|
||||
export const WithDefault: Story = { args: { defaultValue: 'sonoma' } };
|
||||
Reference in New Issue
Block a user