Fix UI for GIFs in groups

This commit is contained in:
Fedor Indutny 2021-06-24 14:00:11 -07:00 committed by GitHub
parent a7799a74c1
commit 6c56d5a5f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 137 additions and 76 deletions

View file

@ -20,6 +20,8 @@ export type Props = {
height?: number;
width?: number;
cropWidth?: number;
cropHeight?: number;
tabIndex?: number;
overlayText?: string;
@ -158,6 +160,8 @@ export class Image extends React.Component<Props> {
theme,
url,
width = 0,
cropWidth = 0,
cropHeight = 0,
} = this.props;
const { caption, pending } = attachment || { caption: null, pending: true };
@ -204,8 +208,10 @@ export class Image extends React.Component<Props> {
curveTopLeft ? 'module-image--curved-top-left' : null,
curveTopRight ? 'module-image--curved-top-right' : null,
smallCurveTopLeft ? 'module-image--small-curved-top-left' : null,
softCorners ? 'module-image--soft-corners' : null
softCorners ? 'module-image--soft-corners' : null,
cropWidth || cropHeight ? 'module-image--cropped' : null
)}
style={{ width: width - cropWidth, height: height - cropHeight }}
>
{pending ? (
this.renderPending()