storybook/docs/snippets/svelte/your-component.js.mdx
2021-11-09 01:41:54 +00:00

25 lines
661 B
Plaintext

```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
};
```