storybook/docs/snippets/svelte/component-story-static-asset-cdn.mdx.mdx
2022-07-07 19:15:02 +01:00

25 lines
575 B
Plaintext

```md
<!-- MyComponent.stories.js -->
import { Meta, Story } from '@storybook/addon-docs';
import MyComponent from './MyComponent.svelte';
<Meta title="img" component={MyComponent} />
<!--
👇 Render functions are a framework specific feature to allow you control on how the component renders.
See https://storybook.js.org/docs/7.0/svelte/api/csf
to learn how to use render functions.
-->
<Story
name="WithAnImage"
render={() => ({
Component: MyComponent,
props: {
src: 'https://place-hold.it/350x150',
alt: 'my image',
},
})} />
```