25
rated 0 times
[
28]
[
3]
/ answers: 1 / hits: 10734
/ 3 Years ago, thu, july 1, 2021, 12:00:00
I want to change the color of react-icons when I hover over them with my mouse. With the code given below the icon only changes color when the mouse is hovering on the icon's lines. For instance with a mail icon the color only changes when the cursor hovers over the lines of the icon and not the empty spaces. How would I get the icon to change color if I hover over any part of it?
<AiOutlineMail size="80px"
onMouseOver={({target})=>target.style.color="white"}
onMouseOut={({target})=>target.style.color="black"}
/>
More From » reactjs