storybook/docs/snippets/react/page-story-slots.js.mdx
2021-11-09 01:41:54 +00:00

27 lines
538 B
Plaintext

```js
// Page.stories.js|jsx
import React from 'react';
import { Page } from './Page';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Page',
component: Page,
};
const Template = (args) => (args) => (
<Page {...args}>
<footer>{args.footer}</footer>
</Page>
);
export const CustomFooter= Template.bind({});
CustomFooter.args = {
footer: 'Built with Storybook',
};
```