@micromag/element-container 0.3.605 → 0.3.607

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 +6 -2
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
3
  import classNames from 'classnames';
3
4
  import PropTypes from 'prop-types';
4
5
  import React from 'react';
@@ -11,25 +12,28 @@ var propTypes = {
11
12
  })]),
12
13
  width: PropTypes.number.isRequired,
13
14
  height: PropTypes.number.isRequired,
15
+ style: PropTypes.shape({}),
14
16
  className: PropTypes.string,
15
17
  children: PropTypes.node
16
18
  };
17
19
  var defaultProps = {
18
20
  containerRef: null,
19
21
  className: null,
22
+ style: null,
20
23
  children: null
21
24
  };
22
25
  function Container(_ref) {
23
26
  var containerRef = _ref.containerRef,
24
27
  width = _ref.width,
25
28
  height = _ref.height,
29
+ style = _ref.style,
26
30
  className = _ref.className,
27
31
  children = _ref.children;
28
32
  var hasSize = width > 0 && height > 0;
29
- var containerStyle = hasSize ? {
33
+ var containerStyle = hasSize ? _objectSpread({
30
34
  width: width,
31
35
  height: height
32
- } : null;
36
+ }, style) : style;
33
37
  return /*#__PURE__*/React.createElement("div", {
34
38
  ref: containerRef,
35
39
  className: classNames([styles.container, _defineProperty({}, className, className !== null)]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-container",
3
- "version": "0.3.605",
3
+ "version": "0.3.607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.605",
62
+ "@micromag/core": "^0.3.607",
63
63
  "classnames": "^2.2.6",
64
64
  "lodash": "^4.17.21",
65
65
  "prop-types": "^15.7.2",
@@ -70,5 +70,5 @@
70
70
  "access": "public",
71
71
  "registry": "https://registry.npmjs.org/"
72
72
  },
73
- "gitHead": "6cdf9b727b794de87e0cfe2e7cf437859661d6b8"
73
+ "gitHead": "635ee4c6bf057273a9c90bde7c80134ad92ebb9c"
74
74
  }