storybook/docs/snippets/react/page-story-slots.mdx.mdx
2021-10-05 02:08:12 +01:00

23 lines
440 B
Plaintext

```md
<!-- Page.stories.mdx -->
import { Meta, Story } from '@storybook/addon-docs';
import { Page } from './Page';
<Meta title="Page" component={Page} />
<!-- The render function is a framework specific construct to tell how the story should render -->
<Story
name="CustomFooter"
args={{
footer: 'Built with Storybook',
}}
render={(args)=>(
<Page {...args}>
<footer>{args.footer}</footer>
</Page>
)}
/>
```