storybook/docs/snippets/vue/page-story-with-args-composition.2.js.mdx
2021-02-24 17:56:50 +00:00

28 lines
765 B
Plaintext

```js
// YourPage.stories.js
import DocumentScreen from './YourPage.vue';
//👇 Imports the required stories
import * as PageLayoutStories from './PageLayout.stories';
import * as DocumentHeaderStories from './DocumentHeader.stories';
import * as DocumentListStories from './DocumentList.stories';
export default {
component: DocumentScreen,
title: '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,
};
```