storybook/docs/snippets/svelte/page-story.js.mdx
2022-11-17 16:33:22 +01:00

33 lines
751 B
Plaintext

```js
// Page.stories.js
import Page from './Page.svelte';
//👇 Imports all Header stories
import * as HeaderStories from './Header.stories';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/7.0/svelte/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Page',
component: Page,
};
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/7.0/svelte/api/csf
* to learn how to use render functions.
*/
export const LoggedIn = {
render: (args) => ({
Component: Page,
props: args,
}),
args: {
...HeaderStories.LoggedIn.args,
},
};
```