storybook/docs/snippets/angular/page-story.ts.mdx
2021-01-30 17:42:31 +00:00

35 lines
734 B
Plaintext

```ts
// Page.stories.ts
import { Story, Meta } from '@storybook/angular/types-6-0';
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: 'Page',
component: Page,
decorators: [
moduleMetadata({
declarations: [Button, Header],
imports: [CommonModule],
}),
],
} as Meta;
const Template: Story<Page> = (args: Page) => ({
component: Page,
props: args,
});
export const LoggedIn = Template.bind({});
LoggedIn.args = {
...HeaderStories.LoggedIn.args,
};
```