@mjhls/mjh-framework 1.0.62 → 1.0.63

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
@@ -7394,21 +7394,26 @@ var AD300x250x600 = function AD300x250x600(_ref) {
7394
7394
 
7395
7395
  var FigureComponent = function FigureComponent(_ref) {
7396
7396
  var caption = _ref.caption,
7397
+ _ref$widthP = _ref.widthP,
7398
+ widthP = _ref$widthP === undefined ? '100' : _ref$widthP,
7399
+ _ref$alignment = _ref.alignment,
7400
+ alignment = _ref$alignment === undefined ? 'center' : _ref$alignment,
7397
7401
  asset = _ref.asset,
7398
7402
  client = _ref.client;
7399
7403
 
7404
+
7400
7405
  var builder = imageUrlBuilder(client);
7401
7406
 
7402
7407
  var urlFor = function urlFor(source) {
7403
7408
  return builder.image(source);
7404
7409
  };
7405
-
7410
+ var imgWidth = widthP + '%';
7406
7411
  return React__default.createElement(
7407
7412
  'div',
7408
- { style: { textAlign: 'center', marginTop: '1em', marginBottom: '1em' } },
7413
+ { style: { textAlign: alignment, marginTop: '1em', marginBottom: '1em' } },
7409
7414
  React__default.createElement(
7410
7415
  reactBootstrap.Figure,
7411
- null,
7416
+ { style: { width: imgWidth } },
7412
7417
  React__default.createElement(reactBootstrap.Figure.Image, { src: urlFor(asset).url() }),
7413
7418
  caption && React__default.createElement(
7414
7419
  reactBootstrap.Figure.Caption,
@@ -11116,9 +11121,11 @@ var getSerializers$1 = function getSerializers(client) {
11116
11121
  figure: function figure(_ref2) {
11117
11122
  var node = _ref2.node;
11118
11123
  var asset = node.asset,
11119
- caption = node.caption;
11124
+ caption = node.caption,
11125
+ widthP = node.widthP,
11126
+ alignment = node.alignment;
11120
11127
 
11121
- return React__default.createElement(FigureComponent, { caption: caption, asset: asset, client: client });
11128
+ return React__default.createElement(FigureComponent, { caption: caption, asset: asset, client: client, widthP: widthP, alignment: alignment });
11122
11129
  },
11123
11130
  slideshow: function slideshow(_ref3) {
11124
11131
  var node = _ref3.node;