2020-05-10 22:15:06 +05:00
|
|
|
import React from 'react';
|
|
|
|
|
import {KeyboardAvoidingView, Platform, SafeAreaView} from 'react-native';
|
2020-09-27 10:15:19 +05:00
|
|
|
import { useSafeAreaInsets} from 'react-native-safe-area-context';
|
2020-01-25 23:47:17 +05:00
|
|
|
import SelectionHeader from '../SelectionHeader';
|
2020-05-10 22:15:06 +05:00
|
|
|
import {ContainerTopSection} from './ContainerTopSection';
|
2020-01-13 14:44:42 +05:00
|
|
|
|
2020-05-10 22:15:06 +05:00
|
|
|
export const Container = ({children,root}) => {
|
2020-09-27 10:15:19 +05:00
|
|
|
const insets = useSafeAreaInsets();
|
2020-04-22 13:37:01 +05:00
|
|
|
|
2020-01-13 14:44:42 +05:00
|
|
|
return (
|
2020-04-19 21:27:03 +05:00
|
|
|
<KeyboardAvoidingView
|
2020-04-16 13:57:51 +05:00
|
|
|
behavior="padding"
|
2020-04-18 13:39:45 +05:00
|
|
|
enabled={Platform.OS === 'ios' ? true : false}>
|
2020-05-10 22:15:06 +05:00
|
|
|
<SafeAreaView
|
2020-01-13 14:44:42 +05:00
|
|
|
style={{
|
2020-04-19 21:27:03 +05:00
|
|
|
height: '100%',
|
2020-04-20 09:22:27 +05:00
|
|
|
paddingTop: insets.top,
|
2020-01-13 14:44:42 +05:00
|
|
|
}}>
|
2020-05-10 22:15:06 +05:00
|
|
|
<SelectionHeader />
|
|
|
|
|
<ContainerTopSection root={root} />
|
2020-04-19 21:27:03 +05:00
|
|
|
{children}
|
2020-05-10 22:15:06 +05:00
|
|
|
</SafeAreaView>
|
2020-04-19 21:27:03 +05:00
|
|
|
</KeyboardAvoidingView>
|
2020-01-13 14:44:42 +05:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Container;
|