@mjhls/mjh-framework 1.0.156 → 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 CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.156
2
+ # mjh-framework v. 1.0.158
3
3
 
4
4
 
5
5
 
package/dist/index.es.js CHANGED
@@ -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 10%';
10738
+ figureMargin = '0 1.5rem 1.5rem 0';
10739
10739
  }
10740
10740
  if (imgFloat === 'right') {
10741
- figureMargin = '0 10% 1.5rem 1.5rem';
10741
+ figureMargin = '0 0 1.5rem 1.5rem';
10742
10742
  }
10743
10743
 
10744
10744
  var loadImg = function loadImg() {
10745
- if (widthP == 'auto') {
10746
- setimageWidth(imgElement.current.naturalWidth);
10747
- } else {
10748
- setimageWidth(widthP + '%');
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
- if (widthP == 'auto') {
10754
- setimageWidth(imgElement.current.naturalWidth + 'px');
10755
- } else {
10756
- setimageWidth(widthP + '%');
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
- }, [imageWidth]);
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 text-center mb-3', style: { width: imageWidth, float: imgFloat, clear: 'both', margin: figureMargin, maxWidth: '100%' } },
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' },