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 {useTracked} from '../../provider'; import {ACTIONS} from '../../provider/actions'; import * as Animatable from 'react-native-animatable'; const SelectionWrapper = ({children, item, currentEditingNote, index}) => { const [state, dispatch] = useTracked(); const {colors, selectionMode, selectedItemsList} = state; return ( { dispatch({type: ACTIONS.SELECTED_ITEMS, item: item}); }} style={{ width: '10%', height: 70, justifyContent: 'center', alignItems: 'center', display: selectionMode ? 'flex' : 'none', opacity: selectionMode ? 1 : 0, paddingRight: 10, }}> {selectedItemsList.includes(item) ? ( ) : null} {children} ); }; export default SelectionWrapper;