mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
24 lines
431 B
Plaintext
24 lines
431 B
Plaintext
```ts
|
|
// Button.stories.ts
|
|
|
|
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
|
|
import type { ButtonProps } from './Button';
|
|
import { Button } from './Button';
|
|
|
|
const meta: Meta<ButtonProps> = {
|
|
title: 'Button',
|
|
render: (args) => Button(args),
|
|
argTypes: {
|
|
onClick: { action: 'onClick' },
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<ButtonProps>;
|
|
|
|
export const Text: Story = {
|
|
args:{...},
|
|
};
|
|
```
|