import React from 'react';
import { Text, View } from 'react-native';
import PropTypes from 'prop-types';
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 };
const DirectoryItemLabel = React.memo(({ text, theme }) => {
if (!text) {
return null;
}
return {text};
});
const DirectoryItem = ({
title, description, avatar, onPress, testID, style, rightLabel, type, rid, theme
}) => (
{title}
{ description ? {description} : null }
);
DirectoryItem.propTypes = {
title: PropTypes.string.isRequired,
description: PropTypes.string,
avatar: PropTypes.string,
type: PropTypes.string,
onPress: PropTypes.func.isRequired,
testID: PropTypes.string.isRequired,
style: PropTypes.any,
rightLabel: PropTypes.string,
rid: PropTypes.string,
theme: PropTypes.string
};
DirectoryItemLabel.propTypes = {
text: PropTypes.string,
theme: PropTypes.string
};
export default DirectoryItem;