@trafilea/afrodita-components 5.0.0-beta.36 → 5.0.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.esm.js +6 -11
- package/build/index.esm.js.map +1 -1
- package/build/index.js +6 -11
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -12570,18 +12570,13 @@ var ProductGalleryMobile = function (_a) {
|
|
|
12570
12570
|
}, [selectedValue, images]);
|
|
12571
12571
|
var _c = useState(function () { return images[index]; }), selectedImage = _c[0], setSelectedImage = _c[1];
|
|
12572
12572
|
var handlers = useSwipeable({
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
setIndex(function (index) {
|
|
12576
|
-
if (dir === 'Left') {
|
|
12577
|
-
return Math.min(index + 1, images.length - 1);
|
|
12578
|
-
}
|
|
12579
|
-
if (dir === 'Right') {
|
|
12580
|
-
return Math.max(index - 1, 0);
|
|
12581
|
-
}
|
|
12582
|
-
return index;
|
|
12583
|
-
});
|
|
12573
|
+
onSwipedLeft: useCallback(function (e) {
|
|
12574
|
+
console.log(e);
|
|
12575
|
+
setIndex(function (index) { return Math.min(index + 1, images.length - 1); });
|
|
12584
12576
|
}, [images.length]),
|
|
12577
|
+
onSwipedRight: useCallback(function () {
|
|
12578
|
+
setIndex(function (index) { return Math.max(index - 1, 0); });
|
|
12579
|
+
}, []),
|
|
12585
12580
|
});
|
|
12586
12581
|
useEffect(function () {
|
|
12587
12582
|
setSelectedImage(images[index]);
|