@micromag/element-container 0.3.541 → 0.3.547

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/package.json +4 -5
  2. package/lib/index.js +0 -49
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-container",
3
- "version": "0.3.541",
3
+ "version": "0.3.547",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -30,11 +30,10 @@
30
30
  }
31
31
  ],
32
32
  "license": "ISC",
33
- "main": "lib/index.js",
33
+ "type": "module",
34
34
  "module": "es/index.js",
35
35
  "exports": {
36
36
  ".": {
37
- "require": "./lib/index.js",
38
37
  "import": "./es/index.js"
39
38
  },
40
39
  "./assets/css/styles": "./assets/css/styles.css",
@@ -60,7 +59,7 @@
60
59
  },
61
60
  "dependencies": {
62
61
  "@babel/runtime": "^7.13.10",
63
- "@micromag/core": "^0.3.541",
62
+ "@micromag/core": "^0.3.547",
64
63
  "classnames": "^2.2.6",
65
64
  "lodash": "^4.17.21",
66
65
  "prop-types": "^15.7.2",
@@ -71,5 +70,5 @@
71
70
  "access": "public",
72
71
  "registry": "https://registry.npmjs.org/"
73
72
  },
74
- "gitHead": "6c04a7e327b5fbc096785c11320b3fbd3c5751c8"
73
+ "gitHead": "3c2f5904ce61fcfa61f673c38c2a5ec56e9e2b07"
75
74
  }
package/lib/index.js DELETED
@@ -1,49 +0,0 @@
1
- 'use strict';
2
-
3
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
- var classNames = require('classnames');
5
- var PropTypes = require('prop-types');
6
- var React = require('react');
7
-
8
- var styles = {"container":"micromag-element-container-container"};
9
-
10
- var propTypes = {
11
- containerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
12
- current: PropTypes.any
13
- })]),
14
- width: PropTypes.number.isRequired,
15
- height: PropTypes.number.isRequired,
16
- className: PropTypes.string,
17
- children: PropTypes.node
18
- };
19
- var defaultProps = {
20
- containerRef: null,
21
- className: null,
22
- children: null
23
- };
24
- function Container(_ref) {
25
- var containerRef = _ref.containerRef,
26
- width = _ref.width,
27
- height = _ref.height,
28
- className = _ref.className,
29
- children = _ref.children;
30
- var hasSize = width > 0 && height > 0;
31
- var containerStyle = hasSize ? {
32
- width: width,
33
- height: height
34
- } : null;
35
- return /*#__PURE__*/React.createElement("div", {
36
- ref: containerRef,
37
- className: classNames([styles.container, _defineProperty({}, className, className !== null)]),
38
- style: containerStyle
39
- }, children);
40
- }
41
- Container.propTypes = propTypes;
42
- Container.defaultProps = defaultProps;
43
- var Container$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
44
- return /*#__PURE__*/React.createElement(Container, Object.assign({
45
- containerRef: ref
46
- }, props));
47
- });
48
-
49
- module.exports = Container$1;