mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 10:51:05 +08:00
28 lines
639 B
JavaScript
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 = {};
|