ywana-core8 0.0.404 → 0.0.407

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.
package/dist/index.cjs CHANGED
@@ -161,6 +161,8 @@ var Icon = function Icon(_ref) {
161
161
  size = _ref$size === void 0 ? "normal" : _ref$size,
162
162
  _ref$clickable = _ref.clickable,
163
163
  clickable = _ref$clickable === void 0 ? false : _ref$clickable,
164
+ _ref$disabled = _ref.disabled,
165
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
164
166
  action = _ref.action,
165
167
  _ref$eventPropagation = _ref.eventPropagation,
166
168
  eventPropagation = _ref$eventPropagation === void 0 ? false : _ref$eventPropagation;
@@ -171,12 +173,12 @@ var Icon = function Icon(_ref) {
171
173
  event.preventDefault();
172
174
  }
173
175
 
174
- if (action) action(event);
176
+ if (action && !disabled) action(event);
175
177
  }
176
178
 
177
- var clicker = clickable ? "clickable" : "";
179
+ var style = disabled ? "disabled" : clickable ? "clickable" : "";
178
180
  return /*#__PURE__*/React__default["default"].createElement("i", {
179
- className: "icon " + size + " " + clicker + " material-icons",
181
+ className: "icon " + size + " " + style + " material-icons",
180
182
  onClick: click
181
183
  }, icon);
182
184
  };