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

32 lines
869 B
Plaintext

```js
// YourPage.stories.js
import DocumentScreen from './YourPage.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 {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/svelte/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'DocumentScreen',
component: 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,
};
```