esbenp / react-native-clean-form

Easy react-native forms using bootstrap-like syntax with redux-form+immutablejs integration. Styled using styled-components
http://esbenp.github.io/2017/01/06/react-native-redux-form-immutable-styled-components/
MIT License
478 stars 83 forks source link

Failed to parse declaration "padding: 12 8" #52

Closed leanminmachine closed 7 years ago

leanminmachine commented 7 years ago

Hi, I have cloned the sample app here and it works fine, but when I copied & pasted the code into my project, I get thrown this error. BTW this error only occurs when I declare the UI elements such as Select, Input etc. The containers do not give me this error.

I am intending to use Form.js as a component within a screen (class-based component). Currently the screen is something like this:

` class EditProfileScreen extends Component { render() { const {navigate} = this.props.navigation; return (

    );
}

} `

As I want to use redux as well, I also included mapstatetoprops and the connect helper at the bottom of my Screen's code.

Not sure what I am doing wrong :(

erdalceylan commented 7 years ago

https://github.com/esbenp/react-native-clean-form/issues/50

leanminmachine commented 7 years ago

Thanks for pointing me to that issue @erdalceylan, followed the instructions to modify the padding to paddingTop etc. as well as edited the package.json of react-native-clean-forms in my project. I also realised that if I wrap the form with a class-based component, it seems to screw up the form view. I modified the screen that is supposed to have the Form.js to a functional component and it works 🎉

esbenp commented 7 years ago

53