mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
29 lines
751 B
Plaintext
29 lines
751 B
Plaintext
```ts
|
|
// YourPage.stories.ts|tsx
|
|
|
|
// Replace your-framework with the name of your framework
|
|
import type { Meta, StoryObj } from '@storybook/your-framework';
|
|
|
|
import { DocumentScreen } from './YourPage';
|
|
|
|
// 👇 Imports the required stories
|
|
import * as PageLayout from './PageLayout.stories';
|
|
import * as DocumentHeader from './DocumentHeader.stories';
|
|
import * as DocumentList from './DocumentList.stories';
|
|
|
|
const meta = {
|
|
component: DocumentScreen,
|
|
} satisfies Meta<typeof DocumentScreen>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Simple: Story = {
|
|
args: {
|
|
user: PageLayout.Simple.args.user,
|
|
document: DocumentHeader.Simple.args.document,
|
|
subdocuments: DocumentList.Simple.args.documents,
|
|
},
|
|
};
|
|
```
|