storybook/docs/snippets/angular/list-story-starter.ts.mdx
2022-07-15 11:09:15 -07:00

32 lines
697 B
Plaintext

```ts
// List.stories.ts
import { Meta, StoryFn, 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/7.0/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
component: List,
decorators: [
moduleMetadata({
declarations: [List],
imports: [CommonModule],
}),
],
} as Meta;
// Always an empty list, not super interesting
export const Empty: Story = {
render: (args) => ({
props: args,
template: `<app-list></app-list>`,
}),
};
```