mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:01:53 +08:00
16 lines
325 B
Plaintext
16 lines
325 B
Plaintext
```ts
|
|
// Button.stories.ts
|
|
import type { Meta } from '@storybook/angular';
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
const meta: Meta {
|
|
component: 'demo-button',
|
|
args: {
|
|
// 👇 Create an action that appears when the onClick event is fired
|
|
onClick: action('on-click'),
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
```
|