I am trying to change the icon used for the react-select
multi select indictor to a font-awesome icon, but it is not working. Any idea why?
import React from "react";
import Select, { components } from "react-select";
import { colourOptions } from "./docs/data";
const Placeholder = props => {
return <components.Placeholder {...props} />;
};
const CaretDownIcon = () => {
return <i className="fas fa-caret-down" />;
};
const DropdownIndicator = props => {
return (
<components.DropdownIndicator {...props}>
<CaretDownIcon />
</components.DropdownIndicator>
);
};
export default () => (
<Select
closeMenuOnSelect={false}
components={{ Placeholder, DropdownIndicator }}
placeholder={"Choose"}
styles={{
placeholder: base => ({
...base,
fontSize: "1em",
color: colourOptions[2].color,
fontWeight: 400
})
}}
options={colourOptions}
/>
);
The item tag is shown in the DOM, but I do not see the icon.