storybook/docs/snippets/svelte/button-story-click-handler.native-format.mdx
2022-01-06 20:45:26 +00:00

17 lines
347 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="Hello" on:click={action('clicked')}/>
</Story>
```