Files
notesnook/apps/mobile/src/components/Container/ContainerTopSection.js

27 lines
598 B
JavaScript
Raw Normal View History

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}) => {
const [state] = useTracked();
2020-05-10 22:14:44 +05:00
const {colors, selectionMode} = state;
return (
<View
2020-05-10 22:14:44 +05:00
style={{
backgroundColor: colors.bg,
width: '100%',
opacity: selectionMode ? 0 : 1,
overflow: 'hidden',
transform: [
{
translateY: selectionMode ? -150 : 0,
},
],
2020-05-10 22:14:44 +05:00
}}>
<Header root={root} />
</View>
2020-05-10 22:14:44 +05:00
);
};