import React, { useState } from 'react'; import type { ComponentMeta } from '@storybook/react'; import { CheckboxInput } from '@tih/ui'; export default { argTypes: { defaultValue: { control: 'boolean', }, description: { control: 'text', }, disabled: { control: 'boolean', }, label: { control: 'text', }, value: { control: 'boolean', }, }, component: CheckboxInput, title: 'CheckboxInput', } as ComponentMeta; export function Basic({ defaultValue, description, disabled, label, }: Pick< React.ComponentProps, 'defaultValue' | 'description' | 'disabled' | 'label' >) { return ( ); } Basic.args = { description: 'I will be responsible for any mistakes', disabled: false, label: 'I have read the terms and conditions', }; export function Controlled() { const [value, setValue] = useState(true); return ( { setValue(newValue); }} /> ); } export function Disabled() { return (
); } export function ItemDescriptions() { return ( ); }