mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 03:11:49 +08:00
21 lines
299 B
Plaintext
21 lines
299 B
Plaintext
```ts
|
|
// Button.stories.ts
|
|
|
|
import { Button } from './button.component';
|
|
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
export default {
|
|
component: Button,
|
|
};
|
|
|
|
export const Text = {
|
|
render: () => ({
|
|
props: {
|
|
label: 'Button',
|
|
onClick: action('clicked'),
|
|
},
|
|
}),
|
|
};
|
|
```
|