import React from 'react'; import { FormControl, InputLabel, MenuItem, Select, SelectProps, SelectChangeEvent, } from '@mui/material'; import { SELECT_ITEM_ID } from 'utils/testIds'; import { KeyboardArrowDownOutlined } from '@mui/icons-material'; import { SxProps } from '@mui/system'; import { Theme } from '@mui/material/styles'; export interface ISelectOption { key: string; title?: string; label?: string; disabled?: boolean; sx?: SxProps; } export interface IGeneralSelectProps extends Omit { name?: string; value?: string; label?: string; options: ISelectOption[]; onChange: (key: string) => void; disabled?: boolean; fullWidth?: boolean; classes?: any; defaultValue?: string; } const GeneralSelect: React.FC = ({ name, value = '', label = '', options, onChange, id, disabled = false, className, classes, fullWidth, ...rest }) => { const onSelectChange = (event: SelectChangeEvent) => { event.preventDefault(); onChange(String(event.target.value)); }; return ( {label} ); }; export default GeneralSelect;