2020-05-10 22:15:06 +05:00
|
|
|
import React from 'react';
|
2021-04-11 14:04:14 +05:00
|
|
|
import { KeyboardAvoidingView, Platform, SafeAreaView } from 'react-native';
|
2021-02-15 11:04:33 +05:00
|
|
|
import Animated from 'react-native-reanimated';
|
2020-11-18 18:17:46 +05:00
|
|
|
import { useTracked } from '../../provider';
|
2021-02-15 11:04:33 +05:00
|
|
|
import { ContainerScale } from '../../utils/Animations';
|
2020-01-25 23:47:17 +05:00
|
|
|
import SelectionHeader from '../SelectionHeader';
|
2021-04-11 14:04:14 +05:00
|
|
|
import { ContainerTopSection } from './ContainerTopSection';
|
2021-02-15 11:04:33 +05:00
|
|
|
const AnimatedView = Animated.createAnimatedComponent(SafeAreaView);
|
2020-10-03 14:06:05 +05:00
|
|
|
export const Container = ({children, root}) => {
|
2020-11-18 18:17:46 +05:00
|
|
|
const [state] = useTracked();
|
|
|
|
|
const {colors, } = state;
|
2020-01-13 14:44:42 +05:00
|
|
|
return (
|
2021-02-15 11:04:33 +05:00
|
|
|
<KeyboardAvoidingView behavior="padding" enabled={Platform.OS === 'ios'}
|
|
|
|
|
style={{
|
2021-02-27 12:26:51 +05:00
|
|
|
backgroundColor:colors.bg,
|
2021-02-15 11:04:33 +05:00
|
|
|
width:"100%",
|
|
|
|
|
height:"100%"
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<AnimatedView
|
2020-01-13 14:44:42 +05:00
|
|
|
style={{
|
2020-04-19 21:27:03 +05:00
|
|
|
height: '100%',
|
2021-02-10 21:57:08 +05:00
|
|
|
backgroundColor:colors.bg,
|
2021-02-15 11:04:33 +05:00
|
|
|
borderRadius:10,
|
|
|
|
|
overflow:"hidden",
|
|
|
|
|
transform:[
|
|
|
|
|
{
|
|
|
|
|
scale:ContainerScale
|
|
|
|
|
}
|
|
|
|
|
]
|
2020-01-13 14:44:42 +05:00
|
|
|
}}>
|
2021-04-11 14:04:14 +05:00
|
|
|
|
2020-04-19 21:27:03 +05:00
|
|
|
{children}
|
2021-02-15 11:04:33 +05:00
|
|
|
</AnimatedView>
|
2020-04-19 21:27:03 +05:00
|
|
|
</KeyboardAvoidingView>
|
2020-01-13 14:44:42 +05:00
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Container;
|