storybook/docs/snippets/svelte/button-story-click-handler.native-format.mdx
2021-05-07 18:07:39 +01:00

17 lines
352 B
Plaintext

```html
<-- Button.stories.svelte -->
<script>
import { Meta, Story } from '@storybook/addon-svelte-csf';
import { action } from '@storybook/addon-actions';
import Button from './Button.svelte';
</script>
<Meta title="Button" component={Button}/>
<Story name="Text">
<Button text="Custom text" on:click={action('clicked')}/>
</Story>
```