revdev-components 0.168.0 → 0.169.0
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/build/button/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ButtonProps as AntdButtonProps } from "antd";
|
|
|
3
3
|
import { TooltipPlacement } from "antd/es/tooltip";
|
|
4
4
|
import { RegularIconName } from "../icon";
|
|
5
5
|
interface ButtonContentProps extends Omit<AntdButtonProps, "icon" | "rightIcon"> {
|
|
6
|
-
icon?: RegularIconName;
|
|
6
|
+
icon?: RegularIconName | React.ReactElement;
|
|
7
7
|
rightIcon?: RegularIconName;
|
|
8
8
|
isPrimary?: boolean;
|
|
9
9
|
}
|
package/build/index.js
CHANGED
|
@@ -5494,17 +5494,19 @@ var HeaderActionPanel = function (_a) {
|
|
|
5494
5494
|
var content = action;
|
|
5495
5495
|
var button = action;
|
|
5496
5496
|
var link = action;
|
|
5497
|
+
var _a = action, icon = _a.icon, loading = _a.loading;
|
|
5498
|
+
var iconElement = loading ? React.createElement(antd.Spin, null) : icon;
|
|
5497
5499
|
if (content === null || content === void 0 ? void 0 : content.content) {
|
|
5498
5500
|
return React.createElement(React.Fragment, { key: i }, content === null || content === void 0 ? void 0 : content.content);
|
|
5499
5501
|
}
|
|
5500
5502
|
else if (typeof (button === null || button === void 0 ? void 0 : button.onClick) === "function") {
|
|
5501
|
-
var
|
|
5503
|
+
var label = button.label, tooltip = button.tooltip, confirmText = button.confirmText, onClick = button.onClick;
|
|
5502
5504
|
return confirmText ? (React.createElement(antd.Popconfirm, { key: i, title: confirmText, onConfirm: onClick, okText: "Yes", cancelText: "No" },
|
|
5503
|
-
React.createElement(Button, { key: i, icon:
|
|
5505
|
+
React.createElement(Button, { key: i, icon: iconElement, tooltip: tooltip, className: s$4.button, size: size, disabled: loading }, label))) : (React.createElement(Button, { key: i, icon: iconElement, onClick: onClick, tooltip: tooltip, className: s$4.button, size: size, disabled: loading }, label));
|
|
5504
5506
|
}
|
|
5505
5507
|
else if (typeof (link === null || link === void 0 ? void 0 : link.href) === "string") {
|
|
5506
|
-
var
|
|
5507
|
-
return (React.createElement(Button, { key: i, icon:
|
|
5508
|
+
var label = link.label, tooltip = link.tooltip, href = link.href;
|
|
5509
|
+
return (React.createElement(Button, { key: i, icon: iconElement, tooltip: tooltip, href: href, className: s$4.link, size: size, disabled: loading }, label));
|
|
5508
5510
|
}
|
|
5509
5511
|
}))) : null;
|
|
5510
5512
|
};
|