storybook/docs/snippets/common/button-story-action-event-handle.ts-4-9.mdx
2023-05-25 21:04:33 +01:00

23 lines
456 B
Plaintext

```ts
// Button.stories.ts
// Replace your-framework with the name of your framework
import type { Meta } from '@storybook/your-framework';
import { withActions } from '@storybook/addon-actions/decorator';
import { Button } from './Button';
const meta = {
component: Button,
parameters: {
actions: {
handles: ['mouseover', 'click .btn'],
},
},
decorators: [withActions],
} satisfies Meta<typeof Button>;
export default meta;
```