storybook/docs/snippets/svelte/page-story-with-args-composition.js.mdx
2021-05-06 17:36:21 +01:00

27 lines
697 B
Plaintext

```js
// YourPage.stories.js
import DocumentScreen from './DocumentScreen.svelte';
//👇 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) => ({
Component: DocumentScreen,
props: args,
});
export const SimplePage = Template.bind({});
SimplePage.args = {
user: PageLayoutStories.Simple.args.user,
document: DocumentHeaderStories.Simple.args.document,
subdocuments: DocumentListStories.Simple.args.documents,
};
```