-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Svg Path stroke color should not fixed to '#000' instead of 'currentColor' #171
Comments
Can you please explain what do you mean by currentColor and how you are trying to use it? |
@ShimiSun I found this issue wanting the same thing. I'm trying to use the icons with It doesn't seem like |
@zhangriyueming @DavidJFelix you are right. If you are looking for a temporary solution, overriding the stroke using css worked for me. But the caveat is you will have to add the class .my-grommet-icon path {
stroke: currentColor;
} Or if you are using styled-system, theme-ui or rebass, you could do this: const GrIconWrapper = ({ icon: Icon, sx, ...props }) => (
<Box
{...props}
as={Icon}
sx={{
...sx,
path: {
stroke: 'currentColor',
},
}}
/>
);
// and use it like
<GrIconWrapper icon={GrForwardTen} /> |
@ShimiSun It's a simple search and replace across all files. Do you need help with this? Should take only minutes to fix to make them usable. |
Go for it buddy, thanks! |
@ericsoderberghp @alansouzati It seems that having non "#" starting color value breaks StyledIcon ? |
@TomasB Not sure what you are asking, would you like to file a contribution with the suggested fix you have in mind? |
Svg Path stroke color should not fixed to '#000' instead of 'currentColor'
The text was updated successfully, but these errors were encountered: