@treely/strapi-slices 6.0.3 → 6.1.0

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.
@@ -2540,6 +2540,8 @@ var TextCarousel = function TextCarousel(_ref) {
2540
2540
  formatMessage = _useContext.formatMessage;
2541
2541
  var _useWindowSize = useWindowSize(),
2542
2542
  windowWidth = _useWindowSize.width;
2543
+ var _useRouter = useRouter(),
2544
+ push = _useRouter.push;
2543
2545
  var _useState = useState(0),
2544
2546
  sliderIndex = _useState[0],
2545
2547
  setSliderIndex = _useState[1];
@@ -2600,7 +2602,9 @@ var TextCarousel = function TextCarousel(_ref) {
2600
2602
  var id = _ref2.id,
2601
2603
  title = _ref2.title,
2602
2604
  text = _ref2.text,
2603
- icon = _ref2.icon;
2605
+ icon = _ref2.icon,
2606
+ image = _ref2.image,
2607
+ button = _ref2.button;
2604
2608
  return React.createElement(CardContainer, {
2605
2609
  key: id,
2606
2610
  ref: itemRef
@@ -2616,6 +2620,21 @@ var TextCarousel = function TextCarousel(_ref) {
2616
2620
  objectFit: icon.objectFit || 'contain'
2617
2621
  }
2618
2622
  }),
2623
+ image: image && React.createElement(Image, {
2624
+ src: strapiMediaUrl(image == null ? void 0 : image.img, 'medium'),
2625
+ alt: image == null ? void 0 : image.alt,
2626
+ fill: true,
2627
+ style: {
2628
+ objectFit: (image == null ? void 0 : image.objectFit) || 'cover',
2629
+ borderRadius: 'var(--boemly-radii-xl)'
2630
+ }
2631
+ }),
2632
+ button: button && {
2633
+ text: button.text,
2634
+ onClick: function onClick() {
2635
+ return push(strapiLinkUrl(button));
2636
+ }
2637
+ },
2619
2638
  displayAs: "column"
2620
2639
  }));
2621
2640
  })), React.createElement(Box, {