storybook/docs/snippets/react/component-story-static-asset-cdn.mdx.mdx
2021-10-12 21:52:15 +01:00

15 lines
417 B
Plaintext

```md
<!-- MyComponent.stories.mdx -->
import { Meta, Story } from '@storybook/addon-docs';
import { MyComponent } from './MyComponent';
<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={() => <img src="https://place-hold.it/350x150" alt="My CDN placeholder" />} />
```