Skip to content

Commit efaa3fa

Browse files
authored
fix(dialog): remove defaultprops (#2639)
1 parent 7b1ed92 commit efaa3fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/packages/dialog/dialogwrap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Content } from './content'
55
import { OverlayProps, defaultOverlayProps } from '@/packages/overlay/overlay'
66
import { ComponentDefaults } from '@/utils/typings'
77
import Overlay from '@/packages/overlay'
8+
import { mergeProps } from '@/utils/merge-props'
89

910
interface DialogWrapProps extends OverlayProps {
1011
visible: boolean
@@ -43,7 +44,7 @@ export const DialogWrap: FunctionComponent<
4344
onClose,
4445
onCancel,
4546
onOverlayClick,
46-
} = props
47+
} = mergeProps(defaultDialogProps, props)
4748

4849
const onHandleClickOverlay = (e: any) => {
4950
if (closeOnOverlayClick && visible && e.target === e.currentTarget) {
@@ -77,5 +78,4 @@ export const DialogWrap: FunctionComponent<
7778
</>
7879
)
7980
}
80-
DialogWrap.defaultProps = defaultDialogProps
8181
DialogWrap.displayName = 'NutDialogWrap'

0 commit comments

Comments
 (0)