@mjhls/mjh-framework 1.0.157 → 1.0.158
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 +19 -13
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +18 -12
- 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, createElement, createContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import reactDom from 'react-dom';
|
|
4
4
|
import Container from 'react-bootstrap/Container';
|
|
@@ -10735,27 +10735,33 @@ var FigureComponent = function FigureComponent(_ref) {
|
|
|
10735
10735
|
figureMargin = '0 auto 1rem';
|
|
10736
10736
|
}
|
|
10737
10737
|
if (imgFloat === 'left') {
|
|
10738
|
-
figureMargin = '0 1.5rem 1.5rem
|
|
10738
|
+
figureMargin = '0 1.5rem 1.5rem 0';
|
|
10739
10739
|
}
|
|
10740
10740
|
if (imgFloat === 'right') {
|
|
10741
|
-
figureMargin = '0
|
|
10741
|
+
figureMargin = '0 0 1.5rem 1.5rem';
|
|
10742
10742
|
}
|
|
10743
10743
|
|
|
10744
10744
|
var loadImg = function loadImg() {
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10745
|
+
var screenWidth = window.innerWidth;
|
|
10746
|
+
if (screenWidth > 1000) {
|
|
10747
|
+
if (widthP === 'auto') {
|
|
10748
|
+
setimageWidth('30%');
|
|
10749
|
+
} else {
|
|
10750
|
+
setimageWidth(widthP + '%');
|
|
10751
|
+
}
|
|
10749
10752
|
}
|
|
10750
10753
|
};
|
|
10751
10754
|
|
|
10752
10755
|
useEffect(function () {
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10756
|
+
var screenWidth = window.innerWidth;
|
|
10757
|
+
if (screenWidth > 1000) {
|
|
10758
|
+
if (widthP === 'auto') {
|
|
10759
|
+
setimageWidth('30%');
|
|
10760
|
+
} else {
|
|
10761
|
+
setimageWidth(widthP + '%');
|
|
10762
|
+
}
|
|
10757
10763
|
}
|
|
10758
|
-
}, [
|
|
10764
|
+
}, [widthP]);
|
|
10759
10765
|
|
|
10760
10766
|
useEffect(function () {
|
|
10761
10767
|
var screenWidth = window.innerWidth;
|
|
@@ -10769,7 +10775,7 @@ var FigureComponent = function FigureComponent(_ref) {
|
|
|
10769
10775
|
|
|
10770
10776
|
return React__default.createElement(
|
|
10771
10777
|
Figure,
|
|
10772
|
-
{ className: 'd-block
|
|
10778
|
+
{ className: 'd-block', style: { width: imageWidth, maxWidth: '100%', clear: 'both', float: imgFloat, margin: figureMargin } },
|
|
10773
10779
|
link ? React__default.createElement(
|
|
10774
10780
|
'a',
|
|
10775
10781
|
{ href: link, target: blank ? '_blank' : '_self' },
|