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

26 lines
611 B
Plaintext

```js
// YourPage.stories.js
import React from 'react';
import DocumentScreen from './YourPage';
//👇 Imports the required stories
import PageLayout from './PageLayout.stories';
import DocumentHeader from './DocumentHeader.stories';
import DocumentList from './DocumentList.stories';
export default {
component: DocumentScreen,
title: 'DocumentScreen',
};
const Template = (args) => <DocumentScreen {...args} />;
export const Simple = Template.bind({});
Simple.args = {
user: PageLayout.Simple.user,
document: DocumentHeader.Simple.document,
subdocuments: DocumentList.Simple.documents,
};
```