Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

fix(helpers.js): adds platform check to extractColor #31

Merged
merged 5 commits into from
Nov 14, 2019

Conversation

shwetsolanki
Copy link
Contributor

@shwetsolanki shwetsolanki commented Sep 10, 2019

Summary

Stroke is not applied to Shapes on iOS. Works correctly for Android. After doing some debugging, figured out when we pass an array value for color, the prop is completely ignored by RN. Only valid values are string and number. The same solution doesn't work with Android. In android it is expecting an array. Thus adding a platform check in helper.js

P.S. If I import from ReactNativeArt.js, array value for color works for iOS and Android both.

Test Plan

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)

package.json Outdated Show resolved Hide resolved
lib/Text.js Outdated Show resolved Hide resolved
lib/helpers.js Outdated Show resolved Hide resolved
@sdeleon28
Copy link

@Esemesek is this ready to be merged now?

@James-E-Adams
Copy link

+1 for fixing the same issue on my end. Patching but keen to see this go in.

@Esemesek
Copy link
Collaborator

Sorry for the delay, I'll check this PR out tomorrow and release a new version.

@James-E-Adams
Copy link

Thanks @Esemesek!

@Esemesek
Copy link
Collaborator

LGTMT. Thank you for your contribution <3

@Esemesek Esemesek merged commit a519246 into react-native-art:master Nov 14, 2019
@Esemesek
Copy link
Collaborator

Released in https://github.com/react-native-community/art/releases/tag/v1.0.3.

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

Successfully merging this pull request may close these issues.

4 participants