first commit
This commit is contained in:
18
src/pageElements/SelectDropdown.js
Normal file
18
src/pageElements/SelectDropdown.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import Dropdown from "react-bootstrap/Dropdown";
|
||||
import DropdownButton from "react-bootstrap/DropdownButton";
|
||||
|
||||
const SelectDropdown = (props) => {
|
||||
const { titleText, dropDownOptions, handleSelect, className } = props;
|
||||
|
||||
return (
|
||||
<DropdownButton className={className} id="dropdown--button" title={`${titleText}`}>
|
||||
{dropDownOptions?.map((option, i) => (
|
||||
<Dropdown.Item key={i} onClick={() => handleSelect(`${option.value}`)}>
|
||||
{`${option.label}`}
|
||||
</Dropdown.Item>
|
||||
))}
|
||||
</DropdownButton>
|
||||
);
|
||||
};
|
||||
|
||||
export default SelectDropdown;
|
||||
Reference in New Issue
Block a user