- Web: Setup Storybook, added addons, configured Tailwind, added stories for UI components. - Backend: Updated API router, database, workers, and auth in common. - Stream Server: Removed SQLx queries and updated auth. - Docs & Scripts: Updated documentation and recovery scripts.
44 lines
946 B
TypeScript
44 lines
946 B
TypeScript
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',
|
|
},
|
|
};
|