storybook/docs/snippets/svelte/component-story-static-asset-without-import.mdx.mdx
2021-10-11 19:53:39 +01:00

21 lines
454 B
Plaintext

```md
<!-- MyComponent.stories.js -->
import { Meta, Story } from '@storybook/addon-docs';
import MyComponent from './MyComponent.svelte0;
<Meta title="img" component={MyComponent} />
<!-- Render functions are a framework specific feature to allow you control on how the component renders -->
<Story
name="withAnImage"
render={() => ({
Component: MyComponent,
props: {
src: '/image.png',
alt: 'my image',
},
})} />
```