storybook/docs/snippets/angular/page-story.ts.mdx
2020-08-14 21:46:15 +01:00

33 lines
662 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';
import * as HeaderStories from './Header.stories';
export default {
title: 'Example/Page',
component: Header,
decorators: [
moduleMetadata({
declarations: [Button, Header],
imports: [CommonModule],
}),
],
};
const Template = (args: Page) => ({
component: Page,
props: args,
});
export const LoggedIn = Template.bind({});
LoggedIn.args = {
...HeaderStories.LoggedIn.args,
};
```