storybook/docs/snippets/web-components/component-story-static-asset-without-import.ts.mdx
2023-09-08 22:25:40 +01:00

20 lines
388 B
Plaintext

```ts
// MyComponent.stories.ts
import type { Meta, StoryObj } from '@storybook/web-components';
import { html } from 'lit';
const meta: Meta = {
component: 'my-component',
};
export default meta;
type Story = StoryObj;
// Assume image.png is located in the "public" directory.
export const WithAnImage: Story = {
render: () => html`<img src="/image.png" alt="image" />`,
};
```