@trafilea/afrodita-components 5.0.0-beta.148 → 5.0.0-beta.149

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.
@@ -16810,7 +16810,10 @@ var settings = {
16810
16810
  var ImageProductWithTags = function (_a) {
16811
16811
  var images = _a.images, _b = _a.customClick, customClick = _b === void 0 ? false : _b, topTag = _a.topTag, bottomTag = _a.bottomTag, testId = _a.testId, borderRadiusVariant = _a.borderRadiusVariant;
16812
16812
  var slick = useRef(null);
16813
- var onButtonClick = function (i) { var _a; return (_a = slick.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(i); };
16813
+ var onButtonClick = useCallback(function (i) {
16814
+ var _a;
16815
+ (_a = slick.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(i);
16816
+ }, [slick]);
16814
16817
  return (jsxs$1(Fragment$1, { children: [customClick && (jsx$1("div", __assign$1({ style: { display: 'flex', marginBottom: '20px', gap: '10px' } }, { children: images.map(function (_, i) { return (jsx$1(ButtonPrimary, { onClick: function () { return onButtonClick(i); }, text: String(i + 1), inline: true }, i)); }) }), void 0)), jsx$1(Container$f, __assign$1({ "data-testid": testId, borderRadiusVariant: borderRadiusVariant }, { children: jsx$1(Slider, __assign$1({}, settings, { ref: slick }, { children: images.map(function (image) {
16815
16818
  return (jsxs$1("div", { children: [jsx$1(InnerImageZoom, { src: image.imageUrl, zoomSrc: image.imageUrl, zoomType: "hover", imgAttributes: { alt: image.alt, width: '100%', height: '510px' }, height: 510, fullscreenOnMobile: true, className: "zoomWrapper" }, void 0), jsx$1(TopTagContainer, __assign$1({ borderRadiusVariant: borderRadiusVariant, "data-testid": "topTag" }, { children: topTag }), void 0), jsx$1(BottomTagContainer, __assign$1({ "data-testid": "bottomTag" }, { children: bottomTag }), void 0)] }, image.key));
16816
16819
  }) }), void 0) }), void 0)] }, void 0));