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

Warining when set Input/Button style using StyleSheet object #10

Open
sadika9 opened this issue Feb 22, 2017 · 3 comments
Open

Warining when set Input/Button style using StyleSheet object #10

sadika9 opened this issue Feb 22, 2017 · 3 comments

Comments

@sadika9
Copy link

sadika9 commented Feb 22, 2017

Get following waring message when try to set stlye of Input/Button componet using react native StyleSheet component

Warning: Failed prop type: Invalid prop`style` supplied to `Input`

I only tried on Input & Button components

@orozcojair
Copy link

I had the same issue just until about an hour ago but then I tried adding my classes as arrays like so:
<Button style={[Styles.button, Styles.registerButton]} textStyle={[Styles.registerText]} >Register</Button>

and now I have no more issues... I think it is misinformation in the docs more than a bug. If they remove the description of object it will be clear

@eduardomoroni
Copy link

Documentation says object, array LINK
I agree that should accept an instance of StyleSheet. If any maintainer agree I can make the changes

@mattapperson
Copy link
Member

@eduardomoroni Yes that change would be most welcome :)

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

No branches or pull requests

4 participants