storybook/docs/snippets/web-components/button-story-click-handler.js.mdx
2023-05-25 21:04:33 +01:00

16 lines
286 B
Plaintext

```js
// Button.stories.js
import { html } from 'lit';
import { action } from '@storybook/addon-actions';
export default {
component: 'custom-button',
};
export const Text = {
render: () => html`<custom-button label="Hello" @click=${action('clicked')}></custom-button>`,
};
```