mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
23 lines
452 B
Plaintext
23 lines
452 B
Plaintext
```md
|
|
<!-- Page.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import { Page } from './Page';
|
|
|
|
<Meta title="Page" component={Page} />
|
|
|
|
|
|
<!-- Render functions are a framework specific feature to allow you control on how the component renders -->
|
|
|
|
<Story
|
|
name="CustomFooter"
|
|
args={{
|
|
footer: 'Built with Storybook',
|
|
}}
|
|
render={(args) => (
|
|
<Page {...args}>
|
|
<footer>{args.footer}</footer>
|
|
</Page>
|
|
)}/>
|
|
``` |