mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 03:21:49 +08:00
24 lines
337 B
Plaintext
24 lines
337 B
Plaintext
```js
|
|
//MyComponent.stories.js
|
|
|
|
import MyComponent from './MyComponent.svelte';
|
|
|
|
import imageFile from './static/image.png';
|
|
|
|
export default {
|
|
component: MyComponent,
|
|
};
|
|
|
|
const image = {
|
|
src: imageFile,
|
|
alt: 'my image',
|
|
};
|
|
|
|
export const WithAnImage = {
|
|
render: () => ({
|
|
Component: MyComponent,
|
|
props: image,
|
|
}),
|
|
};
|
|
```
|