storybook/docs/snippets/angular/your-component-with-decorator.ts.mdx
2021-11-03 23:31:14 +00:00

18 lines
505 B
Plaintext

```ts
// YourComponent.stories.ts
import { componentWrapperDecorator } from '@storybook/angular';
import { YourComponent } from './your.component';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/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>`)],
};
```