@unbxd-ui/unbxd-react-components 0.2.132 → 0.2.134

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.
@@ -26,7 +26,9 @@ var NotificationComponent = function NotificationComponent(props) {
26
26
  messageId = props.messageId,
27
27
  fadeOut = props.fadeOut,
28
28
  fadeOutTime = props.fadeOutTime,
29
- className = props.className;
29
+ className = props.className,
30
+ _props$showClose = props.showClose,
31
+ showClose = _props$showClose === void 0 ? false : _props$showClose;
30
32
  var fadeOutMessage = typeof fadeOut !== "undefined" ? fadeOut : appearance === "success";
31
33
  var timerID;
32
34
  var clearMessage = function clearMessage() {
@@ -52,7 +54,14 @@ var NotificationComponent = function NotificationComponent(props) {
52
54
  } else {
53
55
  return /*#__PURE__*/_react["default"].createElement("div", {
54
56
  className: "RCB-notif RCB-notif-".concat(appearance, " ").concat(className)
55
- }, children);
57
+ }, showClose ? /*#__PURE__*/_react["default"].createElement("div", {
58
+ className: "notif-wrapper"
59
+ }, children, /*#__PURE__*/_react["default"].createElement("div", {
60
+ className: "".concat(appearance, "-cross-icon"),
61
+ onClick: function onClick() {
62
+ setHideMessage(true);
63
+ }
64
+ })) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children));
56
65
  }
57
66
  };
58
67
  NotificationComponent.propTypes = {
@@ -65,7 +74,9 @@ NotificationComponent.propTypes = {
65
74
  /* Should the message fadeout after (fadeOutTime)ms or not. Default true for success messages only. */
66
75
  fadeOut: _propTypes["default"].bool,
67
76
  /* fadeout timer, in milliseconds */
68
- fadeOutTime: _propTypes["default"].number
77
+ fadeOutTime: _propTypes["default"].number,
78
+ /* showClose to hide notification */
79
+ showClose: _propTypes["default"].bool
69
80
  };
70
81
  NotificationComponent.defaultProps = {
71
82
  className: "",
@@ -1 +1 @@
1
- .RCB-notif{padding:10px;border-radius:3px}.RCB-notif-success{color:#129274;border:solid 1px #2cb191;background-color:#edfffb}.RCB-notif-error{color:#d25b5b;border:solid 1px #e75178;background-color:#fff3f6}.RCB-notif-warning{color:#445870;border:solid 1px #efbf6a;background-color:#fffaf2}.RCB-notif-info{color:#509DB9;border:solid 1px #45b5c1;background-color:#f4fcff}
1
+ .RCB-notif{padding:10px;border-radius:3px}.RCB-notif-success{color:#6DB886;border:solid 1px #6DB886;background-color:#DEF9E7}.RCB-notif-error{color:#CA4646;border:solid 1px #CA4646;background-color:#FFE4E4}.RCB-notif-warning{color:#D5A555;border:solid 1px #D5A555;background-color:#FFF8EC}.RCB-notif-info{color:#3E71F2;border:solid 1px #3E71F2;background-color:#E7EDFF}.notif-wrapper{flex:1;display:flex;align-items:center;justify-content:space-between}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbxd-ui/unbxd-react-components",
3
- "version": "0.2.132",
3
+ "version": "0.2.134",
4
4
  "description": "React components library",
5
5
  "keywords": [
6
6
  "react components",