storybook/docs/snippets/vue/page-story-slots.js.mdx
2021-02-22 18:19:50 -06:00

25 lines
469 B
Plaintext

```js
// Page.stories.js
import Page from './Page.vue';
export default {
title: 'Page',
};
const Template = (args, { argTypes }) => ({
components: { Page },
props: Object.keys(argTypes),
template: `
<page v-bind="$props">
<footer v-if="footer" v-slot=footer v-html="footer"/>
</page>
`,
});
export const CustomFooter = Template.bind({});
CustomFooter.args = {
footer: '<a href="https://storybook.js.org/">Built with Storybook</a>',
};
```