storybook/docs/snippets/svelte/component-story-static-asset-cdn.mdx.mdx
2021-11-06 03:20:29 +00:00

22 lines
391 B
Plaintext

```md
<!-- MyComponent.stories.js -->
import { Meta, Story } from '@storybook/addon-docs';
import MyComponent from './MyComponent.svelte';
<Meta title="img" component={MyComponent} />
<Story
name="WithAnImage">
{() => {
return {
Component: MyComponent,
props: {
src: 'https://place-hold.it/350x150',
alt: 'my image',
},
};
}}
</Story>
```