import type { Meta, StoryObj } from '@storybook/react-vite'; import { CounterInput } from './CounterInput'; const meta: Meta = { title: 'UI kit/Form/Inputs/CounterInput', component: CounterInput, tags: ['autodocs'], parameters: { layout: 'centered', }, argTypes: { width: { control: { type: 'radio' }, options: ['xs', 'sm', 'md'], }, disabled: { control: { type: 'boolean' } }, error: { control: { type: 'boolean' } }, warning: { control: { type: 'boolean' } }, }, }; export default meta; type Story = StoryObj; export const Default: Story = { args: { label: 'Quantity', }, }; export const WithValue: Story = { args: { label: 'Quantity', defaultValue: 3, min: 0, max: 10, }, }; export const Disabled: Story = { args: { label: 'Quantity', defaultValue: 2, disabled: true, }, }; export const Error: Story = { args: { label: 'Quantity', defaultValue: 0, error: true, }, }; export const Warning: Story = { args: { label: 'Quantity', defaultValue: 0, warning: true, }, }; export const WithMinMax: Story = { args: { label: 'Quantity', defaultValue: 1, min: 0, max: 5, step: 1, }, }; export const SmallWidth: Story = { args: { label: 'Quantity', width: 'sm', defaultValue: 0, }, }; export const MediumWidth: Story = { args: { label: 'Quantity', width: 'md', defaultValue: 0, }, };