Skip to content

Commit 13f7910

Browse files
committed
feat(modal): make modal's maskClosable to false as default
1 parent c7c7763 commit 13f7910

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

src/float/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from 'react';
2-
import Draggable, { DraggableEventHandler, type DraggableProps } from 'react-draggable';
2+
import Draggable, { type DraggableEventHandler, type DraggableProps } from 'react-draggable';
33
import classNames from 'classnames';
44

55
import useMergeOption, { MergeOption } from './useMergeOption';

src/modal/demos/resizable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState } from 'react';
22
import { Button } from 'antd';
33
import { Modal, Resize, useModal } from 'dt-react-component';
4-
import { RectState } from 'dt-react-component/modal';
4+
import type { RectState } from 'dt-react-component/modal';
55

66
export default function Basic() {
77
const modal = useModal<void>();

src/modal/demos/size.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState } from 'react';
22
import { Button, Space } from 'antd';
33
import { Modal } from 'dt-react-component';
4-
import { IModalProps } from 'dt-react-component/modal';
4+
import type { IModalProps } from 'dt-react-component/modal';
55

66
export default function Size() {
77
const [visible, setVisible] = useState(false);

src/modal/demos/window.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React, { useRef, useState } from 'react';
2-
import { ResizeHandle } from 'react-resizable';
32
import { Button } from 'antd';
43
import { Modal, Resize } from 'dt-react-component';
5-
import { RectState } from 'dt-react-component/modal';
4+
import type { RectState, ResizeHandle } from 'dt-react-component/modal';
65

76
export default function Basic() {
87
const [visible, setVisible] = useState(false);

src/modal/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Object.assign(Modal, {
2525
config,
2626
});
2727

28-
export { IModalProps } from './modal';
28+
export type { IModalProps, RectState } from './modal';
29+
export type { ResizeHandle } from 'react-resizable';
2930

3031
export default Modal;

src/modal/modal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,12 @@ export default function InternalModal({
132132
style={{ height: final.height, width: final.width }}
133133
width={final.width}
134134
modalRender={handleRenderModal}
135+
maskClosable={false}
135136
{...rest}
136137
>
137138
{banner && (
138139
<Alert
140+
className="dtc-modal-alert"
139141
message={isValidBanner(banner) ? banner : banner.message}
140142
banner
141143
{...(isValidBanner(banner) ? {} : omit(banner, 'message'))}

0 commit comments

Comments
 (0)