import * as React from 'react'; import {IOption, ITreeNode, SelectTree, SIZE, TreeUtil} from './../../index'; import {withInfo} from '@storybook/addon-info'; import {boolean, select, text, withKnobs} from '@storybook/addon-knobs'; import {storyLayout} from '../../index.stories'; import {OptionList} from '../option_list/OptionList'; import {Select} from './Select'; import {Value} from './Select.types'; import {iconMap, sizeMap} from '../../utils/storybookEnums'; // eslint-disable-next-line no-restricted-syntax export default { title: 'Select', decorators: [withInfo, withKnobs, storyLayout] }; const options = (): IOption[] => { return [ {title: 'short', value: 'value1'}, {title: 'long', value: 'value2'}, {title: 'o', value: 'value3'}, {title: 'very long', value: 'value4'}, {title: 'very very long very very very very veyr veyvry veyv ey eyv eyv rv eyv eyv ryv eyv ey', value: 'value5'}, {title: 'a1', value: 'value6'}, {title: 'b2', value: 'value7'} ]; }; export const optionList = () => { return ( {}} /> ); }; export const simpleSelect = () => { const [value, setValue]: [Value, any] = React.useState(['1', '2', '3', '4']); const [isAllSelected, setIsAllSelected]: [boolean, any] = React.useState(false); return (