Merge pull request #20 from Skorpios604/master

Deleted dropdown.jsx as it has been moved to the components folder.
This commit is contained in:
Alexander Holliday
2024-05-09 21:40:29 -07:00
committed by GitHub

View File

@@ -1,28 +0,0 @@
import PropTypes from 'prop-types';
import Autocomplete from '@mui/material/Autocomplete';
import TextField from '@mui/material/TextField';
const DropDown = ({ id, label, options, onChange, value }) => {
return (
<Autocomplete
id={id}
options={options}
getOptionLabel={(option) => option.name}
value={value}
onChange={onChange}
renderInput={(params) => <TextField {...params} label={label} />}
/>
);
};
// Define PropTypes for DropDown component
DropDown.propTypes = {
id: PropTypes.string.isRequired,
label: PropTypes.string.isRequired,
options: PropTypes.array.isRequired,
onChange: PropTypes.func.isRequired,
value: PropTypes.object.isRequired,
};
export default DropDown;