@mjhls/mjh-framework 1.0.111 → 1.0.112
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/README.md +1 -1
- package/dist/index.es.js +6 -8
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { Component, useState, useEffect, useRef,
|
|
1
|
+
import React__default, { Component, useState, useEffect, useRef, createContext, createElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import reactDom from 'react-dom';
|
|
4
4
|
import Container from 'react-bootstrap/Container';
|
|
@@ -13805,22 +13805,21 @@ var FigureComponent = function FigureComponent(_ref) {
|
|
|
13805
13805
|
_node$alignment = node$$1.alignment,
|
|
13806
13806
|
alignment = _node$alignment === undefined ? 'center' : _node$alignment;
|
|
13807
13807
|
|
|
13808
|
-
|
|
13809
|
-
var imgWidth = widthP ? widthP + '%' : 'auto';
|
|
13808
|
+
var imgWidth = widthP ? widthP + '%' : '100%';
|
|
13810
13809
|
|
|
13811
13810
|
var figureMargin = void 0;
|
|
13812
13811
|
if (imgFloat === 'none') {
|
|
13813
13812
|
figureMargin = '0 auto 1rem';
|
|
13814
13813
|
}
|
|
13815
13814
|
if (imgFloat === 'left') {
|
|
13816
|
-
figureMargin = '0 1rem 1rem
|
|
13815
|
+
figureMargin = '0 10% 1rem 1rem';
|
|
13817
13816
|
}
|
|
13818
13817
|
if (imgFloat === 'right') {
|
|
13819
|
-
figureMargin = '0
|
|
13818
|
+
figureMargin = '0 1rem 1rem 10%';
|
|
13820
13819
|
}
|
|
13821
13820
|
|
|
13822
13821
|
var loadImg = function loadImg() {
|
|
13823
|
-
setcaptionWidth(imgElement.current.
|
|
13822
|
+
setcaptionWidth(imgElement.current.width);
|
|
13824
13823
|
};
|
|
13825
13824
|
|
|
13826
13825
|
useEffect(function () {
|
|
@@ -13828,14 +13827,13 @@ var FigureComponent = function FigureComponent(_ref) {
|
|
|
13828
13827
|
if (screenWidth > 1000) {
|
|
13829
13828
|
var align = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
|
|
13830
13829
|
setimgFloat(align);
|
|
13831
|
-
loadImg();
|
|
13832
13830
|
}
|
|
13833
13831
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13834
13832
|
}, []);
|
|
13835
13833
|
|
|
13836
13834
|
return React__default.createElement(
|
|
13837
13835
|
Figure,
|
|
13838
|
-
{ className: 'd-block text-center mb-3', style: { width: imgWidth, clear: 'both',
|
|
13836
|
+
{ className: 'd-block text-center mb-3', style: { width: imgWidth, float: imgFloat, clear: 'both', margin: figureMargin } },
|
|
13839
13837
|
link ? React__default.createElement(
|
|
13840
13838
|
'a',
|
|
13841
13839
|
{ href: link, target: blank ? '_blank' : '_self' },
|