Merge pull request #20 from Skorpios604/master
Deleted dropdown.jsx as it has been moved to the components folder.
This commit is contained in:
1 file changed
-28
@@ -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;
|
|
||||||
Reference in new issue
Block a user