storybook/docs/snippets/web-components/component-story-static-asset-without-import.js.mdx
2023-01-05 14:53:03 +00:00

16 lines
287 B
Plaintext

```js
// MyComponent.stories.js
import { html } from 'lit-html';
export default {
title: 'img',
component: 'my-component',
};
// Assume image.png is located in the "public" directory.
export const WithAnImage = {
render: () => html`<img src="/image.png" alt="image" />`,
};
```