fbredius/storybook

View on GitHub
docs/snippets/react/page-story-slots.js.mdx

Summary

Maintainability
Test Coverage
```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) => (
  <Page {...args}>
    <footer>{args.footer}</footer>
  </Page>
);

export const CustomFooter= Template.bind({});
CustomFooter.args = {
  footer: 'Built with Storybook',
};
```