mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:01:53 +08:00
20 lines
388 B
Plaintext
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" />`,
|
|
};
|
|
```
|