hrm_ui_lib 1.2.1 → 1.2.2

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.
@@ -51,6 +51,12 @@ var Button = function Button(props) {
51
51
  children = props.children,
52
52
  rest = _objectWithoutProperties(props, _excluded);
53
53
  var justIcon = !buttonText && !children && iconProps !== undefined;
54
+ var clickHandler = function clickHandler(e) {
55
+ if (disabled || isLoading) {
56
+ return;
57
+ }
58
+ onClick === null || onClick === void 0 || onClick(e);
59
+ };
54
60
  return /*#__PURE__*/React.createElement("button", _extends({
55
61
  ref: refHandler,
56
62
  "data-id": dataId,
@@ -59,7 +65,7 @@ var Button = function Button(props) {
59
65
  className: classNames('btn', "btn--".concat(type), "btn--".concat(size), _defineProperty({
60
66
  'btn--icon': justIcon
61
67
  }, "btn--icon-".concat((iconProps === null || iconProps === void 0 ? void 0 : iconProps.alignment) || 'left'), !isLoading && !justIcon && (iconProps === null || iconProps === void 0 ? void 0 : iconProps.Component)), className),
62
- onClick: onClick,
68
+ onClick: clickHandler,
63
69
  form: formId
64
70
  }, rest), isLoading ? /*#__PURE__*/React.createElement(Loader, {
65
71
  size: size,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hrm_ui_lib",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "UI library for Dino",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",