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

28 lines
725 B
JavaScript
Raw Normal View History

2020-05-10 22:14:44 +05:00
import React from 'react';
import * as Animatable from 'react-native-animatable';
import {useTracked} from '../../provider';
import {Header} from '../header';
import {Search} from '../SearchInput';
export const ContainerTopSection = ({root}) => {
const [state, dispatch] = useTracked();
const {colors, selectionMode} = state;
return (
<Animatable.View
transition="backgroundColor"
duration={300}
style={{
position: selectionMode ? 'relative' : 'absolute',
backgroundColor: colors.bg,
zIndex: 999,
display: selectionMode ? 'none' : 'flex',
width: '100%',
}}>
2020-07-26 13:28:47 +05:00
<Header root={root} />
2020-05-10 22:14:44 +05:00
<Search root={root} />
</Animatable.View>
);
};