storybook/docs/snippets/vue/page-story-with-args-composition.js.mdx
2021-01-28 00:11:22 +00:00

27 lines
725 B
Plaintext

```js
// YourPage.stories.js
import DocumentScreen from './YourPage.vue';
import * as PageLayoutStories from './PageLayout.stories';
import * as DocumentHeaderStories from './DocumentHeader.stories';
import * as DocumentListStories from './DocumentList.stories';
export default {
title:'DocumentScreen',
component: DocumentScreen
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { DocumentScreen },
template: '<DocumentScreen v-bind="$props"/>'
});
export const Simple = Template.bind({});
Simple.args = {
user: PageLayoutStories.Simple.args.user,
document: DocumentHeaderStories.Simple.args.document,
subdocuments: DocumentListStories.Simple.args.documents
};
```