xmirror-components 1.0.23 → 1.0.24
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/dist/index.cjs +14 -14
- package/build/dist/index.mjs +120 -121
- package/build/es/components/IconButton/index.d.ts +3 -4
- package/build/es/components/IconButton/index.js +3 -3
- package/build/lib/components/IconButton/index.d.ts +3 -4
- package/build/lib/components/IconButton/index.js +3 -3
- package/build/lib/index.d.ts +1 -1
- package/build/package.json +1 -1
- package/build/types/components/IconButton/index.d.ts +3 -4
- package/package.json +1 -1
|
@@ -39,7 +39,7 @@ var ButtonTooltip = function (_a) {
|
|
|
39
39
|
return (React.createElement(Tooltip, __assign({ title: disabled ? disabledReason || title : title }, attrs), children));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
export var IconButton = function (props
|
|
42
|
+
export var IconButton = function (props) {
|
|
43
43
|
var Icon = props.icon, _a = props.tooltipDisabled, tooltipDisabled = _a === void 0 ? false : _a, title = props.title, _b = props.hide, hide = _b === void 0 ? false : _b, disabledReason = props.disabledReason, _c = props.onClick, onClick = _c === void 0 ? noop : _c, disabled = props.disabled, _d = props.size, size = _d === void 0 ? 'small' : _d, _e = props.style, style = _e === void 0 ? {} : _e, className = props.className, _f = props.loading, loading = _f === void 0 ? false : _f, attrs = __rest(props, ["icon", "tooltipDisabled", "title", "hide", "disabledReason", "onClick", "disabled", "size", "style", "className", "loading"]);
|
|
44
44
|
var createIcon = function () {
|
|
45
45
|
if (isString(Icon)) {
|
|
@@ -53,7 +53,7 @@ export var IconButton = function (props, buttonRef) {
|
|
|
53
53
|
console.warn('Icon props not found');
|
|
54
54
|
}
|
|
55
55
|
return (React.createElement(ButtonTooltip, __assign({ tooltipDisabled: tooltipDisabled, hide: hide, disabled: disabled, disabledReason: disabledReason, title: title }, attrs),
|
|
56
|
-
React.createElement(StyledButton, {
|
|
56
|
+
React.createElement(StyledButton, { icon: createIcon(), size: size, className: className, disabled: disabled, style: style, loading: loading, onClick: onClick })));
|
|
57
57
|
};
|
|
58
|
-
export default
|
|
58
|
+
export default IconButton;
|
|
59
59
|
var templateObject_1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface ButtonTooltipProps {
|
|
3
3
|
/**
|
|
4
4
|
* 气泡内容
|
|
@@ -52,6 +52,5 @@ interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
|
52
52
|
*/
|
|
53
53
|
[key: string]: any;
|
|
54
54
|
}
|
|
55
|
-
export declare const IconButton: (props: IconButtonProps
|
|
56
|
-
|
|
57
|
-
export default _default;
|
|
55
|
+
export declare const IconButton: (props: IconButtonProps) => React.JSX.Element;
|
|
56
|
+
export default IconButton;
|
|
@@ -45,7 +45,7 @@ var ButtonTooltip = function (_a) {
|
|
|
45
45
|
return (react_1.default.createElement(antd_1.Tooltip, __assign({ title: disabled ? disabledReason || title : title }, attrs), children));
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
var IconButton = function (props
|
|
48
|
+
var IconButton = function (props) {
|
|
49
49
|
var Icon = props.icon, _a = props.tooltipDisabled, tooltipDisabled = _a === void 0 ? false : _a, title = props.title, _b = props.hide, hide = _b === void 0 ? false : _b, disabledReason = props.disabledReason, _c = props.onClick, onClick = _c === void 0 ? lodash_es_1.noop : _c, disabled = props.disabled, _d = props.size, size = _d === void 0 ? 'small' : _d, _e = props.style, style = _e === void 0 ? {} : _e, className = props.className, _f = props.loading, loading = _f === void 0 ? false : _f, attrs = __rest(props, ["icon", "tooltipDisabled", "title", "hide", "disabledReason", "onClick", "disabled", "size", "style", "className", "loading"]);
|
|
50
50
|
var createIcon = function () {
|
|
51
51
|
if ((0, lodash_es_1.isString)(Icon)) {
|
|
@@ -59,8 +59,8 @@ var IconButton = function (props, buttonRef) {
|
|
|
59
59
|
console.warn('Icon props not found');
|
|
60
60
|
}
|
|
61
61
|
return (react_1.default.createElement(ButtonTooltip, __assign({ tooltipDisabled: tooltipDisabled, hide: hide, disabled: disabled, disabledReason: disabledReason, title: title }, attrs),
|
|
62
|
-
react_1.default.createElement(StyledButton, {
|
|
62
|
+
react_1.default.createElement(StyledButton, { icon: createIcon(), size: size, className: className, disabled: disabled, style: style, loading: loading, onClick: onClick })));
|
|
63
63
|
};
|
|
64
64
|
exports.IconButton = IconButton;
|
|
65
|
-
exports.default =
|
|
65
|
+
exports.default = exports.IconButton;
|
|
66
66
|
var templateObject_1;
|
package/build/lib/index.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ declare interface CheckboxValueProps<T = any, F = any> extends Omit<React_2.Comp
|
|
|
77
77
|
|
|
78
78
|
export declare function GlobalLoading(): React_2.JSX.Element;
|
|
79
79
|
|
|
80
|
-
export declare const IconButton: React_2.
|
|
80
|
+
export declare const IconButton: (props: IconButtonProps) => React_2.JSX.Element;
|
|
81
81
|
|
|
82
82
|
declare interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
83
83
|
/**
|
package/build/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface ButtonTooltipProps {
|
|
3
3
|
/**
|
|
4
4
|
* 气泡内容
|
|
@@ -52,6 +52,5 @@ interface IconButtonProps extends Omit<ButtonTooltipProps, 'children'> {
|
|
|
52
52
|
*/
|
|
53
53
|
[key: string]: any;
|
|
54
54
|
}
|
|
55
|
-
export declare const IconButton: (props: IconButtonProps
|
|
56
|
-
|
|
57
|
-
export default _default;
|
|
55
|
+
export declare const IconButton: (props: IconButtonProps) => React.JSX.Element;
|
|
56
|
+
export default IconButton;
|