import React from 'react'; import {View, TouchableOpacity} from 'react-native'; import {SIZE} from '../../common/common'; import Icon from 'react-native-vector-icons/Feather'; import {w} from '../../utils/utils'; import {useAppContext} from '../../provider/useAppContext'; const SelectionWrapper = ({children, item}) => { const { colors, selectionMode, selectedItemsList, updateDB, updateSelectionList, changeSelectionMode, } = useAppContext(); return ( updateSelectionList(item)} style={{ width: 50, height: 70, justifyContent: 'center', alignItems: 'flex-start', display: selectionMode ? 'flex' : 'none', opacity: selectionMode ? 1 : 0, }}> {selectedItemsList.includes(item) ? ( ) : null} {children} ); }; export default SelectionWrapper;