storybook/code/renderers/html/template/cli/ts/Header.stories.ts
2022-10-31 11:57:34 +01:00

32 lines
786 B
TypeScript

import type { Meta, StoryObj } from '@storybook/html';
import type { HeaderProps } from './Header';
import { createHeader } from './Header';
const meta: Meta<HeaderProps> = {
title: 'Example/Header',
render: (args) => createHeader(args),
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' },
},
};
export default meta;
type Story = StoryObj<HeaderProps>;
export const LoggedIn: Story = {
args: {
user: {
name: 'John Doe',
},
},
};
export const LoggedOut: Story = {};