signal-desktop/ts/components/conversation/TypingAnimation.tsx

38 lines
1 KiB
TypeScript
Raw Normal View History

2018-11-14 11:10:32 -08:00
import React from 'react';
import classNames from 'classnames';
2019-01-14 13:49:58 -08:00
import { LocalizerType } from '../../types/Util';
2018-11-14 11:10:32 -08:00
export interface Props {
2019-01-14 13:49:58 -08:00
i18n: LocalizerType;
2018-11-14 11:10:32 -08:00
color?: string;
}
2020-09-14 12:51:27 -07:00
export const TypingAnimation = ({ i18n, color }: Props): JSX.Element => (
<div className="module-typing-animation" title={i18n('typingAlt')}>
<div
className={classNames(
'module-typing-animation__dot',
'module-typing-animation__dot--first',
color ? `module-typing-animation__dot--${color}` : null
)}
/>
<div className="module-typing-animation__spacer" />
<div
className={classNames(
'module-typing-animation__dot',
'module-typing-animation__dot--second',
color ? `module-typing-animation__dot--${color}` : null
)}
/>
<div className="module-typing-animation__spacer" />
<div
className={classNames(
'module-typing-animation__dot',
'module-typing-animation__dot--third',
color ? `module-typing-animation__dot--${color}` : null
)}
/>
</div>
);