Newer
Older
import { StyleSheet, ViewStyle } from 'react-native';
import { STATUS_COLORS, themes } from '../constants/colors';
import Status from './Status/Status';
import { withTheme } from '../theme';
import { TUserStatus } from '../definitions';
const styles = StyleSheet.create({
isGroupChat?: boolean;
teamMain?: boolean;
}
const RoomTypeIcon = React.memo(({ type, isGroupChat, status, style, theme, teamMain, size = 16 }: IRoomTypeIcon) => {
const iconStyle = [styles.icon, { color }, style];
if (!status) {
status = 'offline';
}
return <Status style={[iconStyle, { color: STATUS_COLORS[status] }]} size={size} status={status} />;
icon = `teams${type === 'p' ? '-private' : ''}`;
return <CustomIcon name={icon} size={size} style={iconStyle} />;