mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
18 lines
307 B
Plaintext
18 lines
307 B
Plaintext
```md
|
|
<!-- MyComponent.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import imageFile from './static/image.png';
|
|
|
|
<Meta title="img" />
|
|
|
|
export const image = {
|
|
src: imageFile,
|
|
alt: 'my image',
|
|
};
|
|
|
|
<Story name="withAnImage">
|
|
<img src={image.src} alt={image.alt} />;
|
|
</Story>
|
|
``` |