fbredius/storybook

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

Summary

Maintainability
Test Coverage
```js
// YourComponent.stories.js

import YourComponent from './YourComponent.svelte';

//๐Ÿ‘‡This default export determines where your story goes in the story list
export default {
  /* ๐Ÿ‘‡ The title prop is optional.
  * See https://storybook.js.org/docs/svelte/configure/overview#configure-story-loading
  * to learn how to generate automatic titles
  */
  title: 'YourComponent',
  component: YourComponent,
};

//๐Ÿ‘‡ We create a โ€œtemplateโ€ of how args map to rendering
const Template = (args) => ({
  props: args,
});

export const FirstStory = Template.bind({});
FirstStory.args= {
 //๐Ÿ‘‡ The args you need here will depend on your component
};
```