mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
15 lines
389 B
Plaintext
15 lines
389 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="/image.png" alt="my image" />} />
|
|
``` |