import React, {useState} from 'react' import {centerLayoutDecorator} from '../.storybook/decorators' import {ListInput, ListValue} from './listInput' import {TextInput} from './textInput' export default { component: ListInput, title: 'Input|ListInput', decorators: [centerLayoutDecorator()] } export const Default = () => { const [values, setValues] = useState[]>([ {id: '1', value: 'Hello'}, {id: '2', value: 'World'}, {id: '3', value: 'Test'} ]) return ( {props => ( props.onChange(e.currentTarget.value)} /> )} ) } export const Disabled = () => { const [values, setValues] = useState[]>([ {id: '1', value: 'Hello'}, {id: '2', value: 'World'}, {id: '3', value: 'Test'} ]) return ( {props => ( props.onChange(e.currentTarget.value)} /> )} ) }