mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 19:11:08 +08:00
32 lines
786 B
TypeScript
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 = {};
|