storybook/docs/snippets/web-components/addon-actions-action-function.ts.mdx
Kyle Gach 5a23de20cf Add Parameters API reference
- Add API references for all essential addons
- Consolidate related snippets
2024-01-08 12:59:49 -07:00

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;
```