fbredius/storybook

View on GitHub
docs/snippets/svelte/your-component.native-format.mdx

Summary

Maintainability
Test Coverage
```html
<!-- YourComponent.stories.svelte -->

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

<!--👇 The title determines where your story goes in the story list -->
<Meta
  title="YourComponent"
  component={YourComponent}
  argTypes={{
    /* Customize your args here depending on your component */
  }}
/>

<Template let:args>
  <Button {...args} />
</Template>

<Story
  name="FirstStory"
  args={{
    /* The args you need here will depend on your component */
  }}
/>
```