import React from 'react';
import { Text, View } 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 };
type TDirectoryItemLabel = {
text: string;
theme: string;
}
interface IDirectoryItem {
title: string;
description: string;
avatar: string;
type: string;
onPress(): void;
testID: string;
style: any;
rightLabel: string;
rid: string;
theme: string;
teamMain: boolean;
}
const DirectoryItemLabel = React.memo(({ text, theme }: TDirectoryItemLabel) => {
if (!text) {
return null;
}
return {text};
});
const DirectoryItem = ({
title, description, avatar, onPress, testID, style, rightLabel, type, rid, theme, teamMain
}: IDirectoryItem) => (
{title}
{ description ? {description} : null }
);
export default DirectoryItem;