mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
21 lines
345 B
Plaintext
21 lines
345 B
Plaintext
```md
|
|
<!-- MyComponent.stories.js -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import MyComponent from './MyComponent.svelte0;
|
|
|
|
<Meta title="img" />
|
|
|
|
<Story name="withAnImage">
|
|
{() => {
|
|
return {
|
|
Component: MyComponent,
|
|
props: {
|
|
src: '/image.png',
|
|
alt: 'my image',
|
|
},
|
|
};
|
|
}}
|
|
</Story>
|
|
``` |