storybook/docs/snippets/react/page-story-slots.ts.mdx
Norbert de Langen c0240f8ec5
changes
2022-06-21 18:30:05 +02:00

29 lines
664 B
Plaintext

```ts
// Page.stories.ts|tsx
import React from 'react';
import type { ComponentStoryFn, ComponentMeta } from '@storybook/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,
} as ComponentMeta<typeof Page>;
const Template: ComponentStoryFn<typeof Page> = (args) => (
<Page {...args}>
<footer>{args.footer}</footer>
</Page>
);
export const CustomFooter = Template.bind({});
CustomFooter.args = {
footer: 'Built with Storybook',
};
```