Skip to content

Fix color prop types#2217

Merged
alvelig merged 1 commit intoreact-native-maps:masterfrom
lugg:fix-color-prop-types
May 1, 2018
Merged

Fix color prop types#2217
alvelig merged 1 commit intoreact-native-maps:masterfrom
lugg:fix-color-prop-types

Conversation

@pedro
Copy link
Contributor

@pedro pedro commented Apr 26, 2018

Does any other open PR do the same thing?

No

What issue is this PR fixing?

Using react-native's ColorPropType to validate all color props more accurately.

More specifically I'm doing this to avoid getting yellow box alerts when using different formats for colors. For instance, using setNormalizedColorAlpha() I have colors defined as integers in my app.

How did you test this PR?

Just tested against my app, both in iOS and Android. Colors still work/no more alerts.

use react-native's ColorPropType to validate the input
@pedro
Copy link
Contributor Author

pedro commented Apr 26, 2018

Ah, worth noticing that ColorPropType is already used in MapView.js, so I don't think there are any concerns about compatibility with this change.

@rborn
Copy link
Collaborator

rborn commented May 1, 2018

LGTM @alvelig 🐽

@alvelig alvelig merged commit 16d373f into react-native-maps:master May 1, 2018
pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
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

Successfully merging this pull request may close these issues.

3 participants