storybook/docs/snippets/common/page-story-with-args-composition.ts.mdx
Kyle Gach b97d94e005 Address feedback
- Newline following filename comment
- Fix URLs in comments
- Ensure consistent usage of `ts` vs `tsx` language
2023-01-12 14:17:39 -07:00

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,
},
};
```