diff --git a/components/Lightbox/Desktop/desktopLightbox.module.css b/components/Lightbox/Desktop/desktopLightbox.module.css index 15460ab00..c5de574e4 100644 --- a/components/Lightbox/Desktop/desktopLightbox.module.css +++ b/components/Lightbox/Desktop/desktopLightbox.module.css @@ -46,15 +46,20 @@ } .imageCaption { - background-color: #f0f0f0; + background-color: var(--Base-Surface-Subtle-Normal); padding: var(--Spacing-x-half) var(--Spacing-x1); - border-radius: 4px; + border-radius: var(--Corner-radius-Small); +} + +.mainImageWrapper { + position: relative; + flex: 1; + margin-bottom: var(--Spacing-x2); } .mainImageContainer { - flex: 1; - position: relative; - margin-bottom: var(--Spacing-x2); + width: 100%; + height: 100%; will-change: transform; overflow: hidden; } @@ -137,6 +142,7 @@ cursor: pointer; border: none; display: flex; + z-index: 1; } .navigationButton:hover { @@ -144,7 +150,7 @@ } .prevButton { - left: 0; + left: var(--Spacing-x2); } .leftTransformIcon { @@ -152,7 +158,7 @@ } .nextButton { - right: 0; + right: var(--Spacing-x2); } .portraitImage { diff --git a/components/Lightbox/Desktop/index.tsx b/components/Lightbox/Desktop/index.tsx index c485bb47f..b8ced2630 100644 --- a/components/Lightbox/Desktop/index.tsx +++ b/components/Lightbox/Desktop/index.tsx @@ -140,6 +140,16 @@ function Gallery({ return thumbs } + const handleNext = () => { + const nextIndex = (mainImageIndex + 1) % images.length + onSelectImage(images[nextIndex]) + } + + const handlePrev = () => { + const prevIndex = (mainImageIndex - 1 + images.length) % images.length + onSelectImage(images[prevIndex]) + } + return (
- - + + + {mainImage.alt} + + + - {mainImage.alt} - - + + + + +
{getThumbImages().map((image, index) => (