import React from 'react'; import PropTypes from 'prop-types'; import { Button } from 'react-native-elements'; import { Alert, Text, View } from 'react-native'; import styles from '../Profile.styles.js'; export default function PhoneListItem({ hideDelete, index, label, number, handleDelete, handleEdit, handleEditStart, }) { const _onLongPressDelete = () => { handleDelete(index); }; const _onPressDelete = (isLongPress = false) => () => { if (isLongPress) { handleDelete(index); return; } Alert.alert( 'Delete this number?', 'Are you sure you want to delete this number?', [ { text: 'Cancel', style: 'cancel' }, { text: 'OK', onPress: () => handleDelete(index) }, ], { cancelable: true }, ); }; return ( {number} {label} {handleEdit !== null &&