mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 09:22:09 +08:00
21 lines
395 B
Plaintext
21 lines
395 B
Plaintext
```ts
|
|
// MyComponent.stories.ts
|
|
|
|
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
|
|
import MyComponent from './MyComponent.vue';
|
|
|
|
const meta: Meta<typeof MyComponent> = {
|
|
component: MyComponent,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof MyComponent>;
|
|
|
|
export const WithAnImage: Story = {
|
|
render: () => ({
|
|
template: '<img src="image.png" alt="my image" />',
|
|
}),
|
|
};
|
|
```
|