vn-verdnaturachat/app/presentation/KeyboardView.js

23 lines
608 B
JavaScript
Raw Normal View History

2017-08-09 13:12:00 +00:00
import React from 'react';
import PropTypes from 'prop-types';
import { KeyboardAvoidingView } from 'react-native';
2017-08-09 13:12:00 +00:00
export default class KeyboardView extends React.PureComponent {
static propTypes = {
style: KeyboardAvoidingView.propTypes.style,
keyboardVerticalOffset: PropTypes.number,
2017-08-09 16:19:17 +00:00
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
])
2017-08-09 13:12:00 +00:00
}
render() {
return (
<KeyboardAvoidingView style={this.props.style} behavior='padding' keyboardVerticalOffset={this.props.keyboardVerticalOffset}>
2017-08-09 13:12:00 +00:00
{this.props.children}
</KeyboardAvoidingView>
);
}
}