Updated the root structure of Client side

This commit is contained in:
veyselboybay committed 2024-05-06 12:29:36 -04:00
1 parent d4d684d7c8
commit a76cf36c82
24 files changed
+237 -49

No files matched your search

+1
View File
@@ -0,0 +1 @@
/* dropdown styles*/
+28
View File
@@ -0,0 +1,28 @@
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;