storybook/docs/snippets/vue/component-story-static-asset-without-import.mdx.mdx
2021-11-06 03:20:29 +00:00

20 lines
389 B
Plaintext

```md
<!-- MyComponent.stories.mdx -->
import { Meta, Story } from '@storybook/addon-docs';
<Meta title="img" component={MyComponent}/>
<!-- Assume image.png is located in the "public" directory.-->
<Story
name="WithAnImage">
{() => {
return {
setup() {
return { image };
},
template: `<img src="image.png" alt="my image" />`,
};
}}
</Story>
```