storybook/docs/snippets/angular/your-component-with-decorator.ts.mdx
2022-07-07 19:05:48 +01:00

17 lines
524 B
Plaintext

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