2021-02-15 10:53:55 +05:00
|
|
|
import React from 'react';
|
|
|
|
|
import { View } from 'react-native';
|
|
|
|
|
import { useTracked } from '../../provider';
|
2021-06-05 21:10:20 +05:00
|
|
|
import { useSelectionStore } from '../../provider/stores';
|
2020-05-10 22:14:44 +05:00
|
|
|
|
2021-04-11 14:04:14 +05:00
|
|
|
export const ContainerTopSection = ({children}) => {
|
2021-02-15 10:53:55 +05:00
|
|
|
const [state] = useTracked();
|
2021-06-05 21:10:20 +05:00
|
|
|
const {colors} = state;
|
|
|
|
|
const selectionMode = useSelectionStore(state => state.selectionMode);
|
2020-05-10 22:14:44 +05:00
|
|
|
|
2021-09-13 08:53:16 +05:00
|
|
|
return !selectionMode ? (
|
2021-02-15 10:53:55 +05:00
|
|
|
<View
|
2020-05-10 22:14:44 +05:00
|
|
|
style={{
|
|
|
|
|
backgroundColor: colors.bg,
|
|
|
|
|
width: '100%',
|
2020-10-03 14:06:05 +05:00
|
|
|
overflow: 'hidden',
|
2020-05-10 22:14:44 +05:00
|
|
|
}}>
|
2021-04-11 14:04:14 +05:00
|
|
|
{children}
|
2021-02-15 10:53:55 +05:00
|
|
|
</View>
|
2021-09-13 08:53:16 +05:00
|
|
|
) : null
|
2020-05-10 22:14:44 +05:00
|
|
|
};
|