Skip to content

Instantly share code, notes, and snippets.

@morishin
Created February 14, 2018 08:25
Show Gist options
  • Save morishin/bcd6a01a2175d323b974c8fcaee10790 to your computer and use it in GitHub Desktop.
Save morishin/bcd6a01a2175d323b974c8fcaee10790 to your computer and use it in GitHub Desktop.
import * as React from 'react';
import { KeyboardAvoidingView, KeyboardAvoidingViewProps, Platform, View } from 'react-native';
export default class _KeyboardAvoidingView extends React.Component<KeyboardAvoidingViewProps, {}> {
render() {
if (Platform.OS === 'ios') {
return <KeyboardAvoidingView {...this.props} />;
} else {
return <View {...this.props} />;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment