mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 05:41:07 +08:00
34 lines
709 B
Plaintext
34 lines
709 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) => ({
|
|
props: args,
|
|
});
|
|
|
|
export const LoggedIn = Template.bind({});
|
|
LoggedIn.args = {
|
|
...HeaderStories.LoggedIn.args,
|
|
};
|
|
``` |