mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 07:21:16 +08:00
36 lines
976 B
Plaintext
36 lines
976 B
Plaintext
```ts
|
|
// YourPage.stories.ts
|
|
|
|
import { moduleMetadata } from '@storybook/angular';
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
import DocumentScreen from './YourPage.component';
|
|
import DocumentList from './DocumentList.component';
|
|
import DocumentHeader from './DocumentHeader.component';
|
|
import PageLayout from './PageLayout.component';
|
|
|
|
//👇 Imports the required stories
|
|
import * as PageLayoutStories from './PageLayout.stories';
|
|
import * as DocumentHeaderStories from './DocumentHeader.stories';
|
|
import * as DocumentListStories from './DocumentList.stories';
|
|
|
|
export default {
|
|
component: DocumentScreen,
|
|
decorators: [
|
|
moduleMetadata({
|
|
declarations: [DocumentList, DocumentHeader, PageLayout],
|
|
imports: [CommonModule],
|
|
}),
|
|
],
|
|
};
|
|
|
|
export const Simple = {
|
|
args: {
|
|
user: PageLayoutStories.Simple.args.user,
|
|
document: DocumentHeaderStories.Simple.args.document,
|
|
subdocuments: DocumentListStories.Simple.args.documents,
|
|
},
|
|
};
|
|
```
|