@mjhls/mjh-framework 1.0.166 → 1.0.167

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/dist/index.js CHANGED
@@ -28661,6 +28661,18 @@ var Feature = function Feature(props) {
28661
28661
  return false;
28662
28662
  };
28663
28663
 
28664
+ var urlFor = function urlFor(source) {
28665
+ var client = props.client;
28666
+
28667
+ var builder = imageUrlBuilder(client);
28668
+ return builder.image(source).auto('format');
28669
+ };
28670
+ //image width
28671
+ var imageWidth = 900;
28672
+ if (main_36) {
28673
+ imageWidth = 450;
28674
+ }
28675
+
28664
28676
  var renderUrl = function renderUrl(feature_link, feature_title, feature_body) {
28665
28677
  if (checkUrlIsExternal(feature_link)) {
28666
28678
  return React__default.createElement(
@@ -28719,7 +28731,7 @@ var Feature = function Feature(props) {
28719
28731
  return React__default.createElement(
28720
28732
  Carousel.Item,
28721
28733
  { key: index, style: { background: 'var(--primary)' } },
28722
- React__default.createElement('img', { style: { maxHeight: '375px', minHeight: '300px', objectFit: 'cover', paddingLeft: '50%' }, className: 'd-block w-100', src: feature_img, alt: feature_alt }),
28734
+ React__default.createElement('img', { style: { maxHeight: '375px', minHeight: '300px', objectFit: 'cover', paddingLeft: '50%' }, className: 'd-block w-100', src: urlFor(feature_img).width(imageWidth).url(), alt: feature_alt }),
28723
28735
  React__default.createElement(
28724
28736
  Carousel.Caption,
28725
28737
  { style: { paddingRight: '50%', left: '3rem', right: '3rem', top: '0', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' } },