storybook/docs/snippets/vue/your-component-with-decorator.ts-2.ts.mdx
2022-11-30 20:25:47 +00:00

20 lines
519 B
Plaintext

```ts
// YourComponent.stories.ts
import YourComponent from './YourComponent.vue';
import type { Meta } from '@storybook/vue';
const meta: Meta<typeof YourComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/7.0/vue/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'YourComponent',
component: YourComponent,
decorators: [() => ({ template: '<div style="margin: 3em;"><story/></div>' })],
};
export default meta;
```