Closed osmangund closed 6 months ago
React code samples use currentColor
for fill, so your current usage example is incorrect.
Using currentColor
makes it easy to style icon by adding style={{color: '#eaeaea'}}
. No need to add extra properties.
Furthermore, using fill
is incorrect because not all icons use fill
. Many icons use stroke
. Your solution would work only for a subset of icons. Using fill
as prop for icons is a bad idea.
For React component selections, I think there should be default fill props for path's fill property. Every time that property comes with "#eaeaea" value, and we have to change it manually. But as it's not the svg, we can't change it directly through component's props, so it's either going to be hardcoded or we'll define fill property to pass it as props on component. Since hardcoding is not the best practice, I assume this approach would be better for everyone. Thank you.
Suggested usage:
Current usage: