storybook/docs/snippets/angular/page-story.ts.mdx
2021-09-03 23:31:04 +01:00

31 lines
590 B
Plaintext

```ts
// Page.stories.ts
import { moduleMetadata } from '@storybook/angular';
import { CommonModule } from '@angular/common';
import { Button } from './button.component';
import { Header } from './header.component';
import { Page } from './page.component';
//👇 Imports all Header stories
import * as HeaderStories from './Header.stories';
export default {
component: Page,
decorators: [
moduleMetadata({
declarations: [Button, Header],
imports: [CommonModule],
}),
],
};
export const LoggedIn = {
args: {
...HeaderStories.LoggedIn.args,
},
};
```