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

20 lines
343 B
Plaintext

```html
<!-- MyComponent.stories.svelte -->
<script>
import { Meta, Template, Story } from '@storybook/addon-svelte-csf';
import MyComponent from './MyComponent.svelte';
</script>
<Meta
title="img"
component={MyComponent}
/>
<Template>
<MyComponent src="/image.png" alt="my image" />
</Template>
<Story name="WithAnImage" />
```