mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:01:53 +08:00
15 lines
326 B
Plaintext
15 lines
326 B
Plaintext
```js
|
|
// MyComponent.stories.js | MyComponent.stories.jsx | MyComponent.stories.ts | MyComponent.stories.tsx
|
|
|
|
import React from 'react';
|
|
|
|
export default {
|
|
title: 'img',
|
|
};
|
|
|
|
// Assume image.png is located in the "public" directory.
|
|
export const WithAnImage = {
|
|
render: () => <img src="/image.png" alt="my image" />,
|
|
};
|
|
```
|