mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 05:41:07 +08:00
30 lines
755 B
Plaintext
30 lines
755 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) => ({
|
|
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,
|
|
};
|
|
``` |