storybook/docs/snippets/react/page-story-with-args-composition.js.mdx
2020-10-07 12:23:34 +08:00

24 lines
580 B
Plaintext

```js
// YourPage.stories.js
import React from 'react';
import DocumentScreen from './DocumentScreen';
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,
};
```