2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2018 Signal Messenger, LLC
|
2020-10-30 20:34:04 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2018-11-14 19:10:32 +00:00
|
|
|
import React from 'react';
|
|
|
|
import classNames from 'classnames';
|
|
|
|
|
2021-10-26 19:15:33 +00:00
|
|
|
import type { LocalizerType } from '../../types/Util';
|
2018-11-14 19:10:32 +00:00
|
|
|
|
2021-01-14 18:07:05 +00:00
|
|
|
export type Props = {
|
2019-01-14 21:49:58 +00:00
|
|
|
i18n: LocalizerType;
|
2018-11-14 19:10:32 +00:00
|
|
|
color?: string;
|
2021-01-14 18:07:05 +00:00
|
|
|
};
|
2018-11-14 19:10:32 +00:00
|
|
|
|
2022-11-18 00:45:19 +00:00
|
|
|
export function TypingAnimation({ i18n, color }: Props): JSX.Element {
|
|
|
|
return (
|
2023-03-30 00:03:25 +00:00
|
|
|
<div className="module-typing-animation" title={i18n('icu:typingAlt')}>
|
2022-11-18 00:45:19 +00:00
|
|
|
<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>
|
|
|
|
);
|
|
|
|
}
|