Created
June 26, 2015 11:08
-
-
Save grabbou/96ad065f99c6929fdc38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PureComponent from 'react-pure-render/mixin'; | |
import React from 'react-native'; | |
import { | |
View, | |
Text | |
} from 'react-native'; | |
import TrackKeyboard from '../components/trackKeyboard.react'; | |
import LoginForm from '../auth/loginForm.react'; | |
import style from './register.style.js'; | |
/** | |
* A Register page | |
*/ | |
const Register = React.createClass({ | |
// Load track keyboard mixin | |
mixins: [PureComponent, TrackKeyboard], | |
// Some components were removed for the sake of demo | |
render() { | |
// 110 is our default top padding when keyboard is hidden. | |
const paddingTop = 110 - this.state.keyboardSpace / 3; | |
return ( | |
<View style={style.container}> | |
<View style={[style.content, {paddingTop: paddingTop}]}> | |
<LoginForm /> | |
</View> | |
</View> | |
); | |
} | |
}); | |
export default Register; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Do you have complete example?
Where can I find the TrackKeyboard file?
Thanks