Submitted over 2 years ago
Interactive comments created with react + styled-components
@AliNaderii
Design comparison
SolutionDesign
Solution retrospective
Hello everyone :) Can anybody tell me how I should work with SVG icons? I can't figure out how to give them effects, like changing their color on hover. I'd appreciate it if you could help me.
PS: Would be happy to know what you think of my work :)
Community feedback
- @AliDayi97Posted over 2 years ago
Import them like this example
import { ReactComponent as DeleteIcon } from "./..";
And use like typical react component and you can style them by changing fill property via css, it is like this with tailwind css
<DeleteIcon className="fill-[#ED6368] hover:opacity-50" />Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord