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

Support ColorValue type from RN 0.63 #1567

Closed
Saadnajmi opened this issue Apr 14, 2021 · 3 comments
Closed

Support ColorValue type from RN 0.63 #1567

Saadnajmi opened this issue Apr 14, 2021 · 3 comments

Comments

@Saadnajmi
Copy link
Contributor

https://github.com/react-native-svg/react-native-svg/blob/b2e2c355204ff4b10973d3afce1495f7e4167ff7/src/lib/extract/types.ts#L11

Previously, React Native (>0.63) defined colors as a number or string. With the introduction of Platform Color in React Native 0.63, there is a new React Native ColorValue type that extends the definition to allow platform specific semantic colors.

It would be nice to change RN-SVG's local "Color" type to just match the React Native one.

@Saadnajmi Saadnajmi changed the title Support ColorValue from RN 0.63 Support ColorValue type from RN 0.63 Apr 14, 2021
@Saadnajmi
Copy link
Contributor Author

Looks like this is a dup of #1391

@WoLewicki
Copy link
Member

Since #1561 has been merged, should we close this issue?

@Saadnajmi
Copy link
Contributor Author

Yeah, I think that makes sense. I think there's still an improvement to be made where RN-SVG relies on React Native's ColorValue type and RCTConvert methods, rather than redefining them in it's own repo. However, the issue of supporting PlatformColor is fixed, and my suggestion is "potential improvement" rather than bug, so I'm happy to close this issue.

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