@micromag/element-image 0.3.814 → 0.3.824

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.
Files changed (2) hide show
  1. package/es/index.js +5 -5
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -170,11 +170,14 @@ var Image = function Image(_ref) {
170
170
  _finalWidth = realWidth > 0 ? mediaWidth : null;
171
171
  _finalHeight = realHeight > 0 ? mediaHeight : null;
172
172
  }
173
- finalImageStyle = {
173
+ finalContainerStyle = {
174
174
  width: _finalWidth,
175
175
  height: _finalHeight
176
176
  };
177
- finalContainerStyle = finalImageStyle;
177
+ finalImageStyle = {
178
+ width: '100%',
179
+ height: validHeight ? '100%' : 'auto'
180
+ };
178
181
  }
179
182
  finalContainerStyle = _objectSpread(_objectSpread({}, finalContainerStyle), containerStyle);
180
183
  finalImageStyle = _objectSpread(_objectSpread({}, finalImageStyle), imageStyle);
@@ -187,9 +190,6 @@ var Image = function Image(_ref) {
187
190
  resolution: imageResolution,
188
191
  supportsWebp: supportsWebp
189
192
  });
190
-
191
- // console.log('image finalWidth, finalHeight, resolution', finalImageStyle, resolution, finalUrl);
192
-
193
193
  return /*#__PURE__*/React.createElement("div", {
194
194
  className: classNames([styles.container, _defineProperty({}, className, className !== null)]),
195
195
  style: finalContainerStyle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-image",
3
- "version": "0.3.814",
3
+ "version": "0.3.824",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,7 +60,7 @@
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.13.10",
62
62
  "@folklore/size": "^0.1.20",
63
- "@micromag/core": "^0.3.814",
63
+ "@micromag/core": "^0.3.824",
64
64
  "classnames": "^2.2.6",
65
65
  "prop-types": "^15.7.2",
66
66
  "react-intl": "^6.6.4",
@@ -70,5 +70,5 @@
70
70
  "access": "public",
71
71
  "registry": "https://registry.npmjs.org/"
72
72
  },
73
- "gitHead": "96d19c8ede8dc2e8c051ba118975258e061a8da2"
73
+ "gitHead": "e266e480cdc5741c73160840affee2eac7e7c9de"
74
74
  }