storybook/docs/snippets/angular/list-story-starter.ts.mdx
2021-11-03 23:31:14 +00:00

29 lines
657 B
Plaintext

```ts
// List.stories.ts
import { Story, Meta, moduleMetadata } from '@storybook/angular';
import { CommonModule } from '@angular/common';
import { List } from './list.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
*/
component: List,
decorators: [
moduleMetadata({
declarations: [List],
imports: [CommonModule],
}),
],
};
// Always an empty list, not super interesting
const Template: Story = (args) => ({
props: args,
template: `<app-list></app-list>`,
});
```