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

selectTextStyle has wrong propTypes #25

Closed
mienaikoe opened this issue Sep 17, 2017 · 3 comments
Closed

selectTextStyle has wrong propTypes #25

mienaikoe opened this issue Sep 17, 2017 · 3 comments

Comments

@mienaikoe
Copy link

mienaikoe commented Sep 17, 2017

If you set textAlign or color on the selectTextStyle prop, you get a warning:

Failed prop type: Invalid props.selectTextStyle key 'color' supplied to 'ModalSelector'.

I looked into the source code, and found that index.js:29 has this:
selectTextStyle: ViewPropTypes.style,
should be:
selectTextStyle: Text.propTypes.style

I'll put in a pull request for it if this looks like a valid bug to you

@peacechen
Copy link
Owner

Hi @mienaikoe
A PR would be fantastic. Can selectTextStyle be both a string and style object? If so, add both as an array to PropTypes.oneOfType

@mienaikoe
Copy link
Author

mienaikoe commented Sep 17, 2017

hey @peacechen

I think selectTextStyle can only be a style object. The string for the select text would be set on the initValue prop.

I'll do a PR

@peacechen
Copy link
Owner

Merged. Thanks the the PR 👍

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