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 +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +5 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/icon.css +4 -0
- package/src/html/icon.js +4 -4
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
|
179
|
+
var style = disabled ? "disabled" : clickable ? "clickable" : "";
|
178
180
|
return /*#__PURE__*/React__default["default"].createElement("i", {
|
179
|
-
className: "icon " + size + " " +
|
181
|
+
className: "icon " + size + " " + style + " material-icons",
|
180
182
|
onClick: click
|
181
183
|
}, icon);
|
182
184
|
};
|