import React from 'react'; import DropdownToggle from "react-bootstrap/lib/esm/DropdownToggle"; import {FontAwesomeIcon as Fa} from "@fortawesome/react-fontawesome"; import DropdownMenu from "react-bootstrap/lib/esm/DropdownMenu"; import DropdownItem from "react-bootstrap/lib/esm/DropdownItem"; import {useTranslation} from "react-i18next"; import {Dropdown} from "react-bootstrap"; export const DropDownWithOptions = ({selected, optionList, onChange, optionLabelMapper, icon, title}) => { const {t} = useTranslation(); return ( {t(optionLabelMapper ? optionLabelMapper(selected) : selected)}
{t(title)}
{optionList.map((option, i) => ( onChange(option)}> {t(optionLabelMapper ? optionLabelMapper(option) : option)} ))}
) };