This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/stories/Header.stories.js

29 lines
713 B
JavaScript

import MyHeader from './Header.vue';
export default {
title: 'Example/Header',
component: MyHeader,
};
const Template = (args) => ({
// Components used in your story `template` are defined in the `components` object
components: { MyHeader },
// The story's `args` need to be mapped into the template through the `setup()` method
setup() {
// Story args can be spread into the returned object
return { ...args };
},
// Then, the spread values can be accessed directly in the template
template: '<my-header :user="user" />',
});
export const LoggedIn = Template.bind({});
LoggedIn.args = {
user: {},
};
export const LoggedOut = Template.bind({});
LoggedOut.args = {
user: null,
};