@lobehub/ui 1.153.6 → 1.153.7
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/es/Modal/index.d.ts +2 -0
- package/es/Modal/index.js +4 -3
- package/package.json +1 -1
package/es/Modal/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type ModalProps as AntModalProps } from 'antd';
|
|
3
|
+
import { type ActionIconProps } from "../ActionIcon";
|
|
3
4
|
export type ModalProps = AntModalProps & {
|
|
4
5
|
allowFullscreen?: boolean;
|
|
6
|
+
closeIconProps?: ActionIconProps;
|
|
5
7
|
enableResponsive?: boolean;
|
|
6
8
|
maxHeight?: string | number | false;
|
|
7
9
|
paddings?: {
|
package/es/Modal/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
6
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
7
|
-
var _excluded = ["allowFullscreen", "children", "title", "className", "wrapClassName", "width", "onCancel", "open", "destroyOnClose", "paddings", "maxHeight", "enableResponsive", "footer", "styles"],
|
|
7
|
+
var _excluded = ["allowFullscreen", "children", "title", "className", "wrapClassName", "width", "onCancel", "open", "destroyOnClose", "paddings", "maxHeight", "enableResponsive", "closeIconProps", "footer", "styles"],
|
|
8
8
|
_excluded2 = ["body"];
|
|
9
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
10
10
|
import { Modal as AntModal, ConfigProvider, Drawer } from 'antd';
|
|
@@ -48,6 +48,7 @@ var Modal = /*#__PURE__*/memo(function (_ref3) {
|
|
|
48
48
|
maxHeight = _ref3$maxHeight === void 0 ? '75dvh' : _ref3$maxHeight,
|
|
49
49
|
_ref3$enableResponsiv = _ref3.enableResponsive,
|
|
50
50
|
enableResponsive = _ref3$enableResponsiv === void 0 ? true : _ref3$enableResponsiv,
|
|
51
|
+
closeIconProps = _ref3.closeIconProps,
|
|
51
52
|
footer = _ref3.footer,
|
|
52
53
|
_ref3$styles = _ref3.styles,
|
|
53
54
|
stylesProps = _ref3$styles === void 0 ? {} : _ref3$styles,
|
|
@@ -68,9 +69,9 @@ var Modal = /*#__PURE__*/memo(function (_ref3) {
|
|
|
68
69
|
restStyles = _objectWithoutProperties(stylesProps, _excluded2);
|
|
69
70
|
if (enableResponsive && mobile) return /*#__PURE__*/_jsx(Drawer, _objectSpread(_objectSpread({
|
|
70
71
|
className: cx(styles.drawerContent, className),
|
|
71
|
-
closeIcon: /*#__PURE__*/_jsx(ActionIcon, {
|
|
72
|
+
closeIcon: /*#__PURE__*/_jsx(ActionIcon, _objectSpread({
|
|
72
73
|
icon: X
|
|
73
|
-
}),
|
|
74
|
+
}, closeIconProps)),
|
|
74
75
|
destroyOnClose: destroyOnClose,
|
|
75
76
|
extra: allowFullscreen && /*#__PURE__*/_jsx(ActionIcon, {
|
|
76
77
|
icon: fullscreen ? Minimize2 : Maximize2,
|