-
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
change svg color in js, but not work #97
Comments
#98 likely same issue |
I have the same problem, any solution for this? |
@cieldon32 Which version of React Native and react-native-svg are you using? I can't really help out without more information. |
happens to me too: "react-native": "^0.62.2", Update: Solved. I could't apply the fill due to how the svg was set up (fill-rule="evenodd"). Deleted that from the svg, and everything worked fine. |
I was having the exact same problem with: "react-native": "0.63.0",
"react-native-svg": "^12.1.0",
"react-native-svg-transformer": "^0.14.3", Removing |
Removing fill-rule="evenodd" worked for me too! Thanks! |
how do you set the fill on the Camera svg file? |
I had got this issue in React Native. Now, I have solved by removing default color Before
After
Then I used as
|
Hi,
|
Thanks for your work on this great plugin. I'm unfortunately running into the same issue. Dependencies:
.svgrrc
SVG examples:Here is a case where the color is in the
Expo Specific ConsiderationsIs it possible this doesn't work on Expo without some extra steps? Expo has different dev environments so it's possible it may only work in some of them. Or even just release builds? I haven't tried as a release build myself but I suppose it's possible. Edit: resolved My solution was changing the
This should be updated in the setup instructions. |
import { View, processColor } from "react-native"
<Camera width={24} height={24} fill={'red'}/>
<Camera width={24} height={24} fill={processColor('red')}/>
they show not red
The text was updated successfully, but these errors were encountered: