import { FormControl, MenuItem, Select as SelectMui, SelectChangeEvent, styled, SelectProps as SelectMuiProps, MenuItemProps } from '@mui/material' const SelectCustomized = styled(SelectMui)(() => ({ backgroundColor: 'var(--primary-main)', fontSize: '14px', fontWeight: '500', color: 'white', ':hover': { backgroundColor: 'var(--primary-light)' }, '& .MuiSelect-select:focus': { backgroundColor: 'var(--primary-light)' }, '& .MuiSvgIcon-root': { color: 'white' }, '& .MuiOutlinedInput-notchedOutline': { border: 'none' } })) const MenuItemCustomized = styled(MenuItem)(() => ({ marginInline: '5px', borderRadius: '4px', '&:hover': { background: 'var(--primary-light)', color: 'white' }, '&.Mui-selected': { background: 'var(--primary-dark)', color: 'white' }, '&.Mui-selected:hover': { background: 'var(--primary-light)' }, '&.Mui-selected.Mui-focusVisible': { background: 'var(--primary-light)', color: 'white' }, '&.Mui-focusVisible': { background: 'var(--primary-light)', color: 'white' }, '& + *': { marginTop: '5px' } })) interface SelectItemProps { value: T label: string } interface SelectProps { value: T setValue: React.Dispatch> options: SelectItemProps[] name?: string id?: string } export function Select({ value, setValue, options, name, id }: SelectProps) { const handleChange = (event: SelectChangeEvent) => { setValue(event.target.value as T) } return ( {options.map((o) => { return ( {o.label} ) })} ) }