Skip to content

Commit

Permalink
Fix position of lightbox arrows for a video
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed May 22, 2023
1 parent 759c61d commit 99011b0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
11 changes: 0 additions & 11 deletions stylesheets/components/Lightbox.scss
Expand Up @@ -256,17 +256,6 @@
}
}

&__container--has-controls {
.Lightbox__nav-next,
.Lightbox__nav-prev {
// Give some room for <video/>'s controls.
$controls-height: 64px;

padding-top: $controls-height;
height: calc(100% - $controls-height);
}
}

&__controls {
display: flex;
gap: 32px;
Expand Down
4 changes: 0 additions & 4 deletions ts/components/Lightbox.tsx
Expand Up @@ -484,7 +484,6 @@ export function Lightbox({
const caption = attachment?.caption;

let content: JSX.Element;
let hasControls = false;
if (!contentType) {
content = <>{children}</>;
} else {
Expand Down Expand Up @@ -551,8 +550,6 @@ export function Lightbox({
<source src={objectURL} />
</video>
);

hasControls = true;
} else if (isUnsupportedImageType || isUnsupportedVideoType) {
content = (
<button
Expand Down Expand Up @@ -590,7 +587,6 @@ export function Lightbox({
<div
className={classNames('Lightbox Lightbox__container', {
'Lightbox__container--zoom': isZoomed,
'Lightbox__container--has-controls': hasControls,
})}
onClick={(event: React.MouseEvent<HTMLDivElement>) => {
event.stopPropagation();
Expand Down

0 comments on commit 99011b0

Please sign in to comment.