mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
26 lines
434 B
Plaintext
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',
|
|
};
|
|
```
|