import Ionicons from '@expo/vector-icons/build/Ionicons'; import * as React from 'react'; import { StyleSheet, Text, TouchableHighlight, View } from 'react-native'; import Colors from '../../constants/Colors'; export default function ContactsListItem(props: { contactId: string; name: string; subtitle?: string; isMe?: boolean; onPress: (contactId: string) => void; }) { const onPress = () => { props.onPress && props.onPress(props.contactId); }; const { name, subtitle, isMe } = props; return ( {name} {subtitle && {subtitle}} {isMe && me} ); } const styles = StyleSheet.create({ container: { padding: 16, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', }, title: { fontWeight: 'bold', }, link: { color: Colors.tintColor, }, subtitle: { opacity: 0.8, }, });