Show lightbox for GIFs

This commit is contained in:
Fedor Indutny 2021-07-14 16:39:52 -07:00 committed by GitHub
parent 62ab66c1c8
commit c3bdf3d411
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 790 additions and 815 deletions

View file

@ -29,6 +29,7 @@ export type Props = {
readonly reducedMotion?: boolean;
onError(): void;
showVisualAttachment(): void;
kickOffAttachmentDownload(): void;
};
@ -48,6 +49,7 @@ export const GIF: React.FC<Props> = props => {
),
onError,
showVisualAttachment,
kickOffAttachmentDownload,
} = props;
@ -191,6 +193,12 @@ export const GIF: React.FC<Props> = props => {
onTimeUpdate={onTimeUpdate}
onEnded={onEnded}
onError={onError}
onClick={(event: React.MouseEvent): void => {
event.preventDefault();
event.stopPropagation();
showVisualAttachment();
}}
className="module-image--gif__video"
autoPlay
playsInline