mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 09:31:47 +08:00
- Newline following filename comment - Fix URLs in comments - Ensure consistent usage of `ts` vs `tsx` language
30 lines
764 B
Plaintext
30 lines
764 B
Plaintext
```ts
|
|
// YourPage.stories.ts|tsx
|
|
|
|
import { DocumentScreen } from './YourPage';
|
|
|
|
// Replace your-framework with the name of your framework
|
|
import type { Meta, StoryObj } from '@storybook/your-framework';
|
|
|
|
// 👇 Imports the required stories
|
|
import PageLayout from './PageLayout.stories';
|
|
import DocumentHeader from './DocumentHeader.stories';
|
|
import DocumentList from './DocumentList.stories';
|
|
|
|
const meta: Meta<typeof DocumentScreen> = {
|
|
title: 'DocumentScreen',
|
|
component: DocumentScreen,
|
|
};
|
|
export default meta;
|
|
|
|
type Story = StoryObj<typeof DocumentScreen>;
|
|
|
|
export const Simple: Story = {
|
|
args: {
|
|
user: PageLayout.Simple.args.user,
|
|
document: DocumentHeader.Simple.args.document,
|
|
subdocuments: DocumentList.Simple.args.documents,
|
|
},
|
|
};
|
|
```
|