storybook/docs/snippets/angular/page-story.ts.mdx
2022-07-07 19:05:48 +01:00

35 lines
819 B
Plaintext

```ts
// Page.stories.ts
import { Meta, moduleMetadata, Story } 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 {
/* 👇 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
*/
title: 'Page',
component: Page,
decorators: [
moduleMetadata({
declarations: [Button, Header],
imports: [CommonModule],
}),
],
} as Meta;
export const LoggedIn: Story = {
args: {
...HeaderStories.LoggedIn.args,
},
};
```