// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type { CSSProperties } from 'react'; import React from 'react'; import type { ConversationColorType } from '../types/Colors'; import type { LocalizerType } from '../types/Util'; import { formatRelativeTime } from '../util/formatRelativeTime'; export type PropsType = { backgroundStyle?: CSSProperties; color?: ConversationColorType; i18n: LocalizerType; includeAnotherBubble?: boolean; }; const A_FEW_DAYS_AGO = 60 * 60 * 24 * 5 * 1000; const SampleMessage = ({ color = 'ultramarine', direction, i18n, text, timestamp, status, style, }: { color?: ConversationColorType; direction: 'incoming' | 'outgoing'; i18n: LocalizerType; text: string; timestamp: number; status: 'delivered' | 'read' | 'sent'; style?: CSSProperties; }): JSX.Element => (