storybook/docs/snippets/vue/page-story-with-args-composition.3.js.mdx
2021-11-09 01:41:54 +00:00

34 lines
929 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 {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/vue/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'DocumentScreen',
component: DocumentScreen,
};
const Template = (args) => ({
components: { DocumentScreen },
setup() {
return { args };
},
template: '<DocumentScreen v-bind="args"/>',
});
export const Simple = Template.bind({});
Simple.args = {
user: PageLayoutStories.Simple.args.user,
document: DocumentHeaderStories.Simple.args.document,
subdocuments: DocumentListStories.Simple.args.documents,
};
```