2021-02-15 10:53:55 +05:00
|
|
|
import React from 'react';
|
|
|
|
|
import { View } from 'react-native';
|
|
|
|
|
import { useTracked } from '../../provider';
|
|
|
|
|
import { Header } from '../Header';
|
2020-05-10 22:14:44 +05:00
|
|
|
|
|
|
|
|
export const ContainerTopSection = ({root}) => {
|
2021-02-15 10:53:55 +05:00
|
|
|
const [state] = useTracked();
|
2020-05-10 22:14:44 +05:00
|
|
|
const {colors, selectionMode} = state;
|
|
|
|
|
|
|
|
|
|
return (
|
2021-02-15 10:53:55 +05:00
|
|
|
<View
|
2020-05-10 22:14:44 +05:00
|
|
|
style={{
|
|
|
|
|
backgroundColor: colors.bg,
|
|
|
|
|
width: '100%',
|
2021-02-15 10:53:55 +05:00
|
|
|
opacity: selectionMode ? 0 : 1,
|
2020-10-03 14:06:05 +05:00
|
|
|
overflow: 'hidden',
|
|
|
|
|
transform: [
|
|
|
|
|
{
|
2021-02-15 10:53:55 +05:00
|
|
|
translateY: selectionMode ? -150 : 0,
|
2020-10-03 14:06:05 +05:00
|
|
|
},
|
|
|
|
|
],
|
2020-05-10 22:14:44 +05:00
|
|
|
}}>
|
2021-02-15 10:53:55 +05:00
|
|
|
<Header root={root} />
|
|
|
|
|
</View>
|
2020-05-10 22:14:44 +05:00
|
|
|
);
|
|
|
|
|
};
|