import React, { useState } from 'react'; import type { ComponentMeta } from '@storybook/react'; import type { SelectDisplay } from '@tih/ui'; import { Select } from '@tih/ui'; const SelectDisplays: ReadonlyArray = ['inline', 'block']; export default { argTypes: { disabled: { control: 'boolean', }, display: { control: { type: 'select' }, options: SelectDisplays, }, errorMessage: { control: 'text', }, isLabelHidden: { control: 'boolean', }, label: { control: 'text', }, name: { control: 'text', }, placeholder: { control: 'text', }, }, component: Select, title: 'Select', } as ComponentMeta; export function Basic({ display, isLabelHidden, label, name, }: Pick< React.ComponentProps, 'display' | 'isLabelHidden' | 'label' | 'name' >) { const [value, setValue] = useState('apple'); return ( ); } export function Disabled() { const [value, setValue] = useState('apple'); return (
); } export function Placeholder() { return ( ); } export function Uncontrolled() { return (