storybook/code/renderers/html/template/cli/ts/Header.stories.ts
2022-10-31 10:59:17 +01:00

30 lines
797 B
TypeScript

import type { Meta, StoryFn } from '@storybook/html';
import type { HeaderProps } from './Header';
import { createHeader } from './Header';
export default {
title: 'Example/Header',
parameters: {
// More on Story layout: https://storybook.js.org/docs/html/configure/story-layout
layout: 'fullscreen',
},
// More on argTypes: https://storybook.js.org/docs/html/api/argtypes
argTypes: {
onLogin: { action: 'onLogin' },
onLogout: { action: 'onLogout' },
onCreateAccount: { action: 'onCreateAccount' },
},
} as Meta<HeaderProps>;
const Template: StoryFn<HeaderProps> = (args) => createHeader(args);
export const LoggedIn = Template.bind({});
LoggedIn.args = {
user: {
name: 'John Doe',
},
};
export const LoggedOut = Template.bind({});
LoggedOut.args = {};