Reputation: 13
In React you can change the color of an icon with icon context or the style attribute:
<IconContext.Provider
value={{size: '40px' ,stroke: 'red',color:'red',fill:'red}}
>
<FaTasks>
</IconContext.Provider>
but it's not working what did i wrong i found some similar request on stackoverflow and some sort of bug request on github https://github.com/react-icons/react-icons/issues/404 or is it possibel that some react icons can't be styled with colors
and what's the difference between stroke ,fill ,color?
Upvotes: 1
Views: 3502
Reputation: 6324
just add color prop or fill prop, i cant remember which one. lol
<FaTasks color="red" fill="red">
Upvotes: 3