Account Deleted
You can change the color by first adding the SVG file content directly into your HTML or JSX file, that is add the SVG element, then find the fill attribute in the SVG tag or the path tag inside of the SVG example (<svg><path fill='color' /></svg>) then remove the fill attribute when you find it and apply it from the CSS with the fill property. It this is done you can dynamically change the color from your CSS with javascript or useState hook in react.
Another way you can achieve this is by creating an SVG component that returns the SVG tag then update the fill property with the useState hook, importing the SVG component and applying it, then passing the state down to the SVG component and updating it with the appropriate color respective of the action been carried out.
Marked as helpful