@micromag/element-webview 0.3.47 → 0.3.52

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.
@@ -1 +1 @@
1
- .micromag-element-webview-container{position:relative;width:100%;height:100%;background-color:#343434}.micromag-element-webview-container .micromag-element-webview-iframe{display:block;width:100%;height:100%}.micromag-element-webview-container .micromag-element-webview-top{display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;top:0;right:0;left:0;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;width:100%;padding:5px}.micromag-element-webview-container .micromag-element-webview-close{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:40px;height:40px;border:2px solid #fff;border-radius:50%;background-color:#343434}.micromag-element-webview-container .micromag-element-webview-icon{margin:0;padding:0;line-height:1}
1
+ .micromag-element-webview-container{width:100%;height:100%;background-color:#343434}.micromag-element-webview-container .micromag-element-webview-iframe{display:block;width:100%;height:100%}.micromag-element-webview-container .micromag-element-webview-top{display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;top:0;right:0;left:0;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;width:100%;padding:5px}.micromag-element-webview-container .micromag-element-webview-close{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:40px;height:40px;border:2px solid #fff;border-radius:50%;background-color:#343434}.micromag-element-webview-container .micromag-element-webview-icon{margin:0;padding:0;line-height:1}
package/es/index.js CHANGED
@@ -18,6 +18,7 @@ var propTypes = {
18
18
  height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
19
19
  closeable: PropTypes.bool,
20
20
  onClose: PropTypes.func,
21
+ hidden: PropTypes.bool,
21
22
  className: PropTypes.string
22
23
  };
23
24
  var defaultProps = {
@@ -27,6 +28,7 @@ var defaultProps = {
27
28
  height: null,
28
29
  closeable: false,
29
30
  onClose: null,
31
+ hidden: false,
30
32
  className: null
31
33
  };
32
34
 
@@ -39,8 +41,8 @@ function WebView(_ref) {
39
41
  height = _ref.height,
40
42
  closeable = _ref.closeable,
41
43
  onClose = _ref.onClose,
44
+ hidden = _ref.hidden,
42
45
  className = _ref.className;
43
- console.log(src, width, height);
44
46
  return /*#__PURE__*/React.createElement("div", {
45
47
  className: classNames([styles.container, (_ref2 = {}, _defineProperty(_ref2, styles.closeable, closeable), _defineProperty(_ref2, className, className !== null), _ref2)]),
46
48
  style: {
@@ -56,12 +58,12 @@ function WebView(_ref) {
56
58
  className: styles.icon,
57
59
  icon: faTimes,
58
60
  size: "lg"
59
- }))) : null, /*#__PURE__*/React.createElement("iframe", {
61
+ }))) : null, !hidden ? /*#__PURE__*/React.createElement("iframe", {
60
62
  className: styles.iframe,
61
63
  ref: iframeRef,
62
64
  title: "Popup",
63
65
  src: src
64
- }));
66
+ }) : null);
65
67
  }
66
68
 
67
69
  WebView.propTypes = propTypes;
package/lib/index.js CHANGED
@@ -28,6 +28,7 @@ var propTypes = {
28
28
  height: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
29
29
  closeable: PropTypes__default["default"].bool,
30
30
  onClose: PropTypes__default["default"].func,
31
+ hidden: PropTypes__default["default"].bool,
31
32
  className: PropTypes__default["default"].string
32
33
  };
33
34
  var defaultProps = {
@@ -37,6 +38,7 @@ var defaultProps = {
37
38
  height: null,
38
39
  closeable: false,
39
40
  onClose: null,
41
+ hidden: false,
40
42
  className: null
41
43
  };
42
44
 
@@ -49,8 +51,8 @@ function WebView(_ref) {
49
51
  height = _ref.height,
50
52
  closeable = _ref.closeable,
51
53
  onClose = _ref.onClose,
54
+ hidden = _ref.hidden,
52
55
  className = _ref.className;
53
- console.log(src, width, height);
54
56
  return /*#__PURE__*/React__default["default"].createElement("div", {
55
57
  className: classNames__default["default"]([styles.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles.closeable, closeable), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)]),
56
58
  style: {
@@ -66,12 +68,12 @@ function WebView(_ref) {
66
68
  className: styles.icon,
67
69
  icon: freeSolidSvgIcons.faTimes,
68
70
  size: "lg"
69
- }))) : null, /*#__PURE__*/React__default["default"].createElement("iframe", {
71
+ }))) : null, !hidden ? /*#__PURE__*/React__default["default"].createElement("iframe", {
70
72
  className: styles.iframe,
71
73
  ref: iframeRef,
72
74
  title: "Popup",
73
75
  src: src
74
- }));
76
+ }) : null);
75
77
  }
76
78
 
77
79
  WebView.propTypes = propTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-webview",
3
- "version": "0.3.47",
3
+ "version": "0.3.52",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "access": "public"
65
65
  },
66
- "gitHead": "b44bcdb32bc47ab435846f53d3a518f54ee57b32"
66
+ "gitHead": "55e5140dad51adb6e1052f83b6fcb4db97437a6d"
67
67
  }