Skip to content
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

[v3] Color styles no longer applied to SVG #451

Open
jordmccord opened this issue Dec 18, 2024 · 3 comments
Open

[v3] Color styles no longer applied to SVG #451

jordmccord opened this issue Dec 18, 2024 · 3 comments

Comments

@jordmccord
Copy link

Description

Previously in v2 you could style SVG components by passing a color style prop in v3 this no longer works and the color styles are not applied. I'm aware that there's the withUnistyle method for passing props like the color prop to SVG components but this method doesn't allow for variants.

Steps to Reproduce

  1. Create a react-native-svg SVG component
  2. Add color to the component using the color style value

Snack or Repository Link (Optional)

No response

Unistyles Version

3.0.0-beta.4

React Native Version

0.76.3

Platforms

Android, iOS

Expo

Yes

@jpudysz
Copy link
Owner

jpudysz commented Dec 18, 2024

Please show code example with SVG usage + variants. withUnistyles supports variants

@jordmccord
Copy link
Author

https://github.com/utilitywarehouse/design-systems/blob/unistyles-3/packages/native-ui/src/components/Alert/AlertIcon.tsx

This worked in v2

@jpudysz
Copy link
Owner

jpudysz commented Dec 18, 2024

Thanks, will try to repro & debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants