storybook/docs/snippets/react/page-story-with-args-composition.js.mdx
2022-07-07 19:47:29 +01:00

27 lines
734 B
Plaintext

```js
// YourPage.stories.js|jsx
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';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'DocumentScreen',
component: DocumentScreen,
};
export const Simple = {
args: {
user: PageLayout.Simple.args.user,
document: DocumentHeader.Simple.args.document,
subdocuments: DocumentList.Simple.args.documents,
},
};
```