@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.es.js +12 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -7387,21 +7387,26 @@ var AD300x250x600 = function AD300x250x600(_ref) {
|
|
|
7387
7387
|
|
|
7388
7388
|
var FigureComponent = function FigureComponent(_ref) {
|
|
7389
7389
|
var caption = _ref.caption,
|
|
7390
|
+
_ref$widthP = _ref.widthP,
|
|
7391
|
+
widthP = _ref$widthP === undefined ? '100' : _ref$widthP,
|
|
7392
|
+
_ref$alignment = _ref.alignment,
|
|
7393
|
+
alignment = _ref$alignment === undefined ? 'center' : _ref$alignment,
|
|
7390
7394
|
asset = _ref.asset,
|
|
7391
7395
|
client = _ref.client;
|
|
7392
7396
|
|
|
7397
|
+
|
|
7393
7398
|
var builder = imageUrlBuilder(client);
|
|
7394
7399
|
|
|
7395
7400
|
var urlFor = function urlFor(source) {
|
|
7396
7401
|
return builder.image(source);
|
|
7397
7402
|
};
|
|
7398
|
-
|
|
7403
|
+
var imgWidth = widthP + '%';
|
|
7399
7404
|
return React__default.createElement(
|
|
7400
7405
|
'div',
|
|
7401
|
-
{ style: { textAlign:
|
|
7406
|
+
{ style: { textAlign: alignment, marginTop: '1em', marginBottom: '1em' } },
|
|
7402
7407
|
React__default.createElement(
|
|
7403
7408
|
Figure,
|
|
7404
|
-
|
|
7409
|
+
{ style: { width: imgWidth } },
|
|
7405
7410
|
React__default.createElement(Figure.Image, { src: urlFor(asset).url() }),
|
|
7406
7411
|
caption && React__default.createElement(
|
|
7407
7412
|
Figure.Caption,
|
|
@@ -11109,9 +11114,11 @@ var getSerializers$1 = function getSerializers(client) {
|
|
|
11109
11114
|
figure: function figure(_ref2) {
|
|
11110
11115
|
var node = _ref2.node;
|
|
11111
11116
|
var asset = node.asset,
|
|
11112
|
-
caption = node.caption
|
|
11117
|
+
caption = node.caption,
|
|
11118
|
+
widthP = node.widthP,
|
|
11119
|
+
alignment = node.alignment;
|
|
11113
11120
|
|
|
11114
|
-
return React__default.createElement(FigureComponent, { caption: caption, asset: asset, client: client });
|
|
11121
|
+
return React__default.createElement(FigureComponent, { caption: caption, asset: asset, client: client, widthP: widthP, alignment: alignment });
|
|
11115
11122
|
},
|
|
11116
11123
|
slideshow: function slideshow(_ref3) {
|
|
11117
11124
|
var node = _ref3.node;
|