storybook/docs/snippets/vue/page-story-slots.mdx-2.mdx.mdx
2021-10-11 19:57:39 +01:00

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>`,
})} />
```