Files
imexmobile/components/keyboards/KeyboardAvoidingComponent.js
2023-06-13 15:51:51 -04:00

32 lines
822 B
JavaScript

import { View, Text, Platform } from "react-native";
import React from "react";
import { KeyboardAvoidingView } from "react-native";
import { StyleSheet } from "react-native";
import { TouchableWithoutFeedback } from "react-native";
import { Keyboard } from "react-native";
const KeyboardAvoidingComponent = ({ children }) => {
return (
<KeyboardAvoidingView
enabled
behavior={Platform.OS === "ios" ? "padding":"height" }
style={styles.container}
>
{/* <TouchableWithoutFeedback onPress={Keyboard.dismiss}> */}
<View style={styles.inner}>{children}</View>
{/* </TouchableWithoutFeedback> */}
</KeyboardAvoidingView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
inner: {
flex: 1,
},
});
export default KeyboardAvoidingComponent;