mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 15:41:57 +08:00
22 lines
360 B
Plaintext
22 lines
360 B
Plaintext
```ts
|
|
// Button.stories.ts|tsx
|
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
import { Button, ButtonProps } from './Button';
|
|
|
|
const meta = {
|
|
component: Button,
|
|
} satisfies Meta<typeof Button>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Primary: Story = {
|
|
args: {
|
|
primary: true,
|
|
label: 'Button',
|
|
},
|
|
};
|
|
```
|