// Copyright 2018-2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import classNames from 'classnames'; import { TypingAnimation } from './TypingAnimation'; import { Avatar } from '../Avatar'; import { LocalizerType } from '../../types/Util'; import { ColorType } from '../../types/Colors'; export type Props = { avatarPath?: string; color: ColorType; name?: string; phoneNumber?: string; profileName?: string; title: string; conversationType: 'group' | 'direct'; i18n: LocalizerType; }; export class TypingBubble extends React.PureComponent { public renderAvatar(): JSX.Element | null { const { avatarPath, color, name, phoneNumber, profileName, title, conversationType, i18n, } = this.props; if (conversationType !== 'group') { return null; } return (
); } public render(): JSX.Element { const { i18n, color, conversationType } = this.props; const isGroup = conversationType === 'group'; return (
{this.renderAvatar()}
); } }