storybook/docs/snippets/react/page-story-with-args-composition.ts.mdx
2020-08-18 17:30:56 +01:00

25 lines
697 B
Plaintext

```js
// YourPage.stories.js
import React from 'react';
import { Story, Meta } from '@storybook/react/types-6-0';
import {DocumentScreen, DocumentScreenProps} from './DocumentScreen';
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,
};
```