Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 550 Bytes

button-story-click-handler-simplificated.native-format.mdx

File metadata and controls

27 lines (22 loc) · 550 Bytes
<!-- Button.stories.svelte -->

<script>
  import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
  import Button from './Button.svelte';
</script>

<!-- 
  See https://storybook.js.org/docs/svelte/essentials/actions#action-argtype-annotation
  to learn how to set up argTypes for actions
--> 

<Meta
  title="Button"
  component={Button}
  argTypes={{
    onClick: { action: "onClick" },
  }}
/>

<Template let:args>
  <Button {...args} on:click={args.onClick} />
</Template>

<Story name="Text" args={{ label: 'Hello' }}/>