storybook/docs/snippets/svelte/my-component-story-basic-and-props.js.mdx
2021-11-09 01:41:54 +00:00

25 lines
499 B
Plaintext

```js
// MyComponent.stories.js
import MyComponent from './MyComponent.svelte';
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: 'Path/To/MyComponent',
component: MyComponent,
};
export const Basic = () => ({
Component: MyComponent,
});
export const WithProp = () => ({
Component: MyComponent,
props:{
prop: 'value',
},
});
```