/** * @format */ import React, {FC} from 'react' import {Button, Menu, MenuButton, MenuList, MenuItemOption, MenuOptionGroup, Box} from '@chakra-ui/react' import {OptionListItem} from '../../types/types' import {ChevronDown, ChevronUp} from 'react-feather' type SelectDropDownProps = { optionList: Array dropdownWidth: any selectedOption: OptionListItem onMenuItemClick: (index: number) => void } export const SelectDropdown: FC = ({ optionList, dropdownWidth, selectedOption, onMenuItemClick }) => ( {({isOpen}) => ( <> : } width={'100%'} fontWeight={'normal'} textAlign={'left'} fontSize={'16px'}> {selectedOption.name} {optionList.map((option, index) => ( onMenuItemClick(index)}> {option.name} ))} )} )