import React from 'react'; import { Text, View, ViewStyle } from 'react-native'; import Touch from '../../utils/touch'; import Avatar from '../../containers/Avatar'; import RoomTypeIcon from '../../containers/RoomTypeIcon'; import styles, { ROW_HEIGHT } from './styles'; import { themes } from '../../constants/colors'; export { ROW_HEIGHT }; interface IDirectoryItemLabel { text?: string; theme: string; } interface IDirectoryItem { title: string; description: string; avatar: string; type: string; onPress(): void; testID: string; style?: ViewStyle; rightLabel?: string; rid?: string; theme: string; teamMain?: boolean; } const DirectoryItemLabel = React.memo(({ text, theme }: IDirectoryItemLabel) => { if (!text) { return null; } return {text}; }); const DirectoryItem = ({ title, description, avatar, onPress, testID, style, rightLabel, type, rid, theme, teamMain }: IDirectoryItem): JSX.Element => ( {title} {description ? ( {description} ) : null} ); export default DirectoryItem;