fbredius/storybook

View on GitHub
docs/snippets/angular/your-component-with-decorator.ts.mdx

Summary

Maintainability
Test Coverage
```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/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;
```