Skip to content

Instantly share code, notes, and snippets.

@grabbou
Created June 26, 2015 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grabbou/96ad065f99c6929fdc38 to your computer and use it in GitHub Desktop.
Save grabbou/96ad065f99c6929fdc38 to your computer and use it in GitHub Desktop.
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;
@nidzovito
Copy link

Hi,
Do you have complete example?
Where can I find the TrackKeyboard file?
Thanks

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