storybook/docs/snippets/svelte/component-story-static-asset-without-import.js.mdx
2021-09-06 22:03:15 +01:00

21 lines
344 B
Plaintext

```js
// MyComponent.stories.js
import MyComponent from './MyComponent.svelte';
export default {
component: MyComponent,
};
// Assume image.png is located in the "public" directory.
export const WithAnImage = {
render: () => ({
Component: MyComponent,
props: {
src: '/image.png',
alt: 'my image',
},
}),
};
```