-
Notifications
You must be signed in to change notification settings - Fork 116
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
Icons that require fill
don't change color on native
#2385
Comments
Even the example on the bottom of the Icon docs doesn't appear to be working const GluestackIcon = createIcon({
// createIcon function is imported from '@gluestack-ui/themed'
viewBox: "0 0 32 32",
path: (
<>
{/* Rect, Path is imported from 'react-native-svg' */}
<Rect width="32" height="32" rx="2" fill="currentColor" />
<Path
d="M9.5 14.6642L15.9999 9.87633V12.1358L9.5 16.9236V14.6642Z"
fill="white"
/>
<Path
d="M22.5 14.6642L16.0001 9.87639V12.1359L22.5 16.9237V14.6642Z"
fill="white"
/>
<Path
d="M9.5 19.8641L15.9999 15.0763V17.3358L9.5 22.1236V19.8641Z"
fill="white"
/>
<Path
d="M22.5 19.8642L16.0001 15.0764V17.3358L22.5 22.1237V19.8642Z"
fill="white"
/>
</>
),
}) <Icon as={GluestackIcon} size="xl" className="text-typography-black" /> |
The issue has been resolved with the gluestack-ui icons. Please update your |
This example from the icon docs still isn't working for me on v0.1.22: export const GluestackIcon = createIcon({
Root: Svg,
viewBox: "0 0 32 32",
path: (
<>
{/* Rect, Path is imported from 'react-native-svg' */}
<Rect width="32" height="32" rx="2" fill="currentColor" />
<Path d="M9.5 14.6642L15.9999 9.87633V12.1358L9.5 16.9236V14.6642Z" fill="white" />
<Path d="M22.5 14.6642L16.0001 9.87639V12.1359L22.5 16.9237V14.6642Z" fill="white" />
<Path d="M9.5 19.8641L15.9999 15.0763V17.3358L9.5 22.1236V19.8641Z" fill="white" />
<Path d="M22.5 19.8642L16.0001 15.0764V17.3358L22.5 22.1237V19.8642Z" fill="white" />
</>
),
});
// Usage:
<Icon as={GluestackIcon} size="xl" className="text-typography-black" /> |
@aaronatbissell @mnemitz, Thanks for reporting we will have a look. |
Thanks @Viraj-10 for the quick response! @aaronatbissell I re-added the Also thought I might flag that the |
Thanks @mnemitz, We will add a test case for this. Since this is frequently breaking. |
Just FYI - this is working for me now. I'm not sure if it's broken again, but it's working for me. @mnemitz - I would double check that the changes in #2387 made it into your |
@aaronatbissell Just had a quick look and it looks like there are minor differences between the latest I guess there is an explicit check for } else if (stroke === "currentColor" && color !== undefined) {
colorProps = { ...colorProps, stroke: color };
} Probably want an analogous check for |
Description
When using a custom SVG
Icon
component that requiresfill
, changing that icon color usingclassName='text-primary-500'
doesn't work on nativeCodeSandbox/Snack link
https://github.com/aaronatbissell/gluestack-issue-repro
Steps to reproduce
Code for the CheckIcon that needs to be filled:
gluestack-ui Version
@gluestack-ui/icon: "0.1.22"
Platform
Other Platform
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: