storybook/code/lib/cli/rendererAssets/vue/Header.stories.js
Ian VanSchooten 5da1246c51 Add file extensions to vue imports
Webpack doesn't need them, but Vite does
2022-09-21 23:16:23 -04:00

28 lines
639 B
JavaScript

import MyHeader from './Header.vue';
export default {
title: 'Example/Header',
component: MyHeader,
parameters: {
// More on Story layout: https://storybook.js.org/docs/vue/configure/story-layout
layout: 'fullscreen',
},
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { MyHeader },
template:
'<my-header :user="user" @onLogin="onLogin" @onLogout="onLogout" @onCreateAccount="onCreateAccount" />',
});
export const LoggedIn = Template.bind({});
LoggedIn.args = {
user: {
name: 'Jane Doe',
},
};
export const LoggedOut = Template.bind({});
LoggedOut.args = {};