yet-another-react-lightbox
Advanced tools
Comparing version 3.17.2 to 3.17.3
@@ -87,4 +87,4 @@ import { useLightboxProps, composePrefix, createIcon, cssClass, isImageSlide, clsx, ImageSlide, makeComposePrefix, useEventCallback, cssVar, useRTL, useEvents, useLightboxState, useSensors, useKeyboardNavigation, useAnimation, cleanup, calculatePreload, hasSlides, getSlide, makeUseContext, LightboxPropsProvider, createIconDisabled, IconButton, addToolbarButton, createModule } from '../../index.js'; | ||
} | ||
function boxSize(thumbnails, dimension, includeGap) { | ||
return dimension + 2 * (thumbnails.border + thumbnails.padding) + (includeGap ? thumbnails.gap : 0); | ||
function boxSize(thumbnails, dimension) { | ||
return dimension + 2 * (thumbnails.border + thumbnails.padding) + thumbnails.gap; | ||
} | ||
@@ -108,3 +108,3 @@ function ThumbnailsTrack({ visible, containerRef }) { | ||
{ | ||
transform: `translateX(${(isRTL ? -1 : 1) * boxSize(thumbnails, width, true) * offset + snapshot}px)`, | ||
transform: `translateX(${(isRTL ? -1 : 1) * boxSize(thumbnails, width) * offset + snapshot}px)`, | ||
}, | ||
@@ -115,3 +115,3 @@ { transform: "translateX(0)" }, | ||
{ | ||
transform: `translateY(${boxSize(thumbnails, height, true) * offset + snapshot}px)`, | ||
transform: `translateY(${boxSize(thumbnails, height) * offset + snapshot}px)`, | ||
}, | ||
@@ -176,7 +176,5 @@ { transform: "translateY(0)" }, | ||
...(!visible ? { display: "none" } : null), | ||
...(width !== defaultThumbnailsProps.width | ||
? { [cssVar(cssThumbnailPrefix("width"))]: `${boxSize(thumbnails, width)}px` } | ||
: null), | ||
...(width !== defaultThumbnailsProps.width ? { [cssVar(cssThumbnailPrefix("width"))]: `${width}px` } : null), | ||
...(height !== defaultThumbnailsProps.height | ||
? { [cssVar(cssThumbnailPrefix("height"))]: `${boxSize(thumbnails, height)}px` } | ||
? { [cssVar(cssThumbnailPrefix("height"))]: `${height}px` } | ||
: null), | ||
@@ -183,0 +181,0 @@ ...(border !== defaultThumbnailsProps.border |
{ | ||
"name": "yet-another-react-lightbox", | ||
"version": "3.17.2", | ||
"version": "3.17.3", | ||
"description": "Modern React lightbox component", | ||
@@ -5,0 +5,0 @@ "author": "Igor Danchenko", |
219698
4120