import React from 'react'; import classNames from 'classnames'; import { Contact } from '../../types/Contact'; import { LocalizerType } from '../../types/Util'; import { renderAvatar, renderContactShorthand, renderName, } from './_contactUtil'; interface Props { contact: Contact; hasSignalAccount: boolean; i18n: LocalizerType; isIncoming: boolean; withContentAbove: boolean; withContentBelow: boolean; onClick?: () => void; } export class EmbeddedContact extends React.Component { public render() { const { contact, i18n, isIncoming, onClick, withContentAbove, withContentBelow, } = this.props; const module = 'embedded-contact'; const direction = isIncoming ? 'incoming' : 'outgoing'; return (
{renderAvatar({ contact, i18n, size: 48, direction })}
{renderName({ contact, isIncoming, module })} {renderContactShorthand({ contact, isIncoming, module })}
); } }