storybook/docs/snippets/react/page-story-slots.ts.mdx
2021-08-05 18:51:23 +01:00

26 lines
434 B
Plaintext

```ts
// Page.stories.ts | Page.stories.tsx
import React from 'react';
import { Story, Meta } from '@storybook/react';
import Page from './Page';
export default {
component: Page,
title: 'Page',
} as Meta;
const Template: Story<Page> = (args) => (
<Page {...args}>
<footer>{args.footer}</footer
</Page>
);
export const CustomFooter = Template.bind({});
CustomFooter.args = {
footer: 'Built with Storybook',
};
```