storybook/docs/snippets/react/page-story-with-args-composition.ts.mdx
2021-02-23 00:26:03 +00:00

26 lines
684 B
Plaintext

```js
// YourPage.stories.js
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { DocumentScreen, DocumentScreenProps } from './YourPage';
import PageLayout from './PageLayout.stories';
import DocumentHeader from './DocumentHeader.stories';
import DocumentList from './DocumentList.stories';
export default {
component: DocumentScreen,
title: 'DocumentScreen',
} as Meta;
const Template: Story<DocumentScreenProps> = (args) => <DocumentScreen {...args} />;
export const Simple = Template.bind({});
Simple.args = {
user: PageLayout.Simple.user,
document: DocumentHeader.Simple.document,
subdocuments: DocumentList.Simple.documents,
};
```