mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 22:19:41 +01:00
30 lines
876 B
JavaScript
30 lines
876 B
JavaScript
import React from 'react';
|
|
import {KeyboardAvoidingView, Platform, SafeAreaView} from 'react-native';
|
|
import { useSafeAreaInsets} from 'react-native-safe-area-context';
|
|
import SelectionHeader from '../SelectionHeader';
|
|
import {ContainerBottomButton} from './ContainerBottomButton';
|
|
import {ContainerTopSection} from './ContainerTopSection';
|
|
|
|
export const Container = ({children,root}) => {
|
|
const insets = useSafeAreaInsets();
|
|
|
|
return (
|
|
<KeyboardAvoidingView
|
|
behavior="padding"
|
|
enabled={Platform.OS === 'ios' ? true : false}>
|
|
<SafeAreaView
|
|
style={{
|
|
height: '100%',
|
|
paddingTop: insets.top,
|
|
}}>
|
|
<SelectionHeader />
|
|
<ContainerTopSection root={root} />
|
|
{children}
|
|
<ContainerBottomButton root={root} />
|
|
</SafeAreaView>
|
|
</KeyboardAvoidingView>
|
|
);
|
|
};
|
|
|
|
export default Container;
|