mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 06:31:47 +08:00
25 lines
620 B
Plaintext
25 lines
620 B
Plaintext
```md
|
|
<!-- Page.stories.mdx -->
|
|
|
|
import { Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import Page from './Page.vue';
|
|
|
|
<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: `<a href="https://storybook.js.org/">Built with Storybook</a>`,
|
|
}}
|
|
render={(args, { argTypes }) => ({
|
|
props: Object.keys(argTypes),
|
|
components: { Page },
|
|
template: `
|
|
<page v-bind="$props">
|
|
<footer v-if="footer" v-slot=footer v-html="footer"/>
|
|
</page>`,
|
|
})} />
|
|
``` |