mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { InformationIcon } from '@blocksuite/icons/rc';
|
|
import type { Meta, StoryFn } from '@storybook/react';
|
|
|
|
import type { ButtonProps } from './button';
|
|
import { Button } from './button';
|
|
export default {
|
|
title: 'UI/Button',
|
|
component: Button,
|
|
argTypes: {
|
|
onClick: () => console.log('Click button'),
|
|
},
|
|
} satisfies Meta<ButtonProps>;
|
|
|
|
const Template: StoryFn<ButtonProps> = args => <Button {...args} />;
|
|
|
|
export const Default: StoryFn<ButtonProps> = Template.bind(undefined);
|
|
Default.args = {
|
|
type: 'default',
|
|
children: 'This is a default button',
|
|
icon: <InformationIcon />,
|
|
};
|
|
|
|
export const Primary: StoryFn<ButtonProps> = Template.bind(undefined);
|
|
Primary.args = {
|
|
type: 'primary',
|
|
children: 'Content',
|
|
icon: <InformationIcon />,
|
|
};
|
|
|
|
export const Disabled: StoryFn<ButtonProps> = Template.bind(undefined);
|
|
Disabled.args = {
|
|
disabled: true,
|
|
children: 'This is a disabled button',
|
|
};
|
|
|
|
export const LargeSizeButton: StoryFn<ButtonProps> = Template.bind(undefined);
|
|
LargeSizeButton.args = {
|
|
size: 'large',
|
|
children: 'This is a large button',
|
|
};
|
|
|
|
export const ExtraLargeSizeButton: StoryFn<ButtonProps> =
|
|
Template.bind(undefined);
|
|
ExtraLargeSizeButton.args = {
|
|
size: 'extraLarge',
|
|
children: 'This is a extra large button',
|
|
};
|