veza/apps/web/src/components/ui/Checkbox.stories.tsx

45 lines
946 B
TypeScript
Raw Normal View History

import type { Meta, StoryObj } from '@storybook/react';
// import { fn } from '@storybook/test';
import { Checkbox } from './checkbox';
const meta = {
title: 'UI/Checkbox',
component: Checkbox,
tags: ['autodocs'],
argTypes: {
label: { control: 'text' },
disabled: { control: 'boolean' },
checked: { control: 'boolean' },
},
args: {
label: 'Accept terms and conditions',
onCheckedChange: () => { }, // fn()
}
} satisfies Meta<typeof Checkbox>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {};
export const Checked: Story = {
args: {
checked: true,
},
};
export const Disabled: Story = {
args: {
disabled: true,
label: 'Disabled option',
},
};
export const DisabledChecked: Story = {
args: {
disabled: true,
checked: true,
label: 'Disabled and checked',
},
};