Improve layout of various message bubbles

This commit is contained in:
Scott Nonnenberg 2022-04-07 09:58:15 -07:00 committed by GitHub
parent 933c07c9ce
commit b50c96c0b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 166 additions and 25 deletions

View file

@ -8,12 +8,13 @@ import { getIncrement, getTimerBucket } from '../../util/timer';
import { clearTimeoutIfNecessary } from '../../util/clearTimeoutIfNecessary';
export type Props = {
deletedForEveryone?: boolean;
direction?: 'incoming' | 'outgoing';
expirationLength: number;
expirationTimestamp?: number;
withImageNoCaption?: boolean;
withSticker?: boolean;
withTapToViewExpired?: boolean;
expirationLength: number;
expirationTimestamp: number;
direction?: 'incoming' | 'outgoing';
};
export class ExpireTimer extends React.Component<Props> {
@ -46,6 +47,7 @@ export class ExpireTimer extends React.Component<Props> {
public override render(): JSX.Element {
const {
deletedForEveryone,
direction,
expirationLength,
expirationTimestamp,
@ -62,6 +64,9 @@ export class ExpireTimer extends React.Component<Props> {
'module-expire-timer',
`module-expire-timer--${bucket}`,
direction ? `module-expire-timer--${direction}` : null,
deletedForEveryone
? 'module-expire-timer--deleted-for-everyone'
: null,
withTapToViewExpired
? `module-expire-timer--${direction}-with-tap-to-view-expired`
: null,