diff --git a/src/packages/dialog/dialogwrap.tsx b/src/packages/dialog/dialogwrap.tsx index c9a9a6852e..4486e67a13 100644 --- a/src/packages/dialog/dialogwrap.tsx +++ b/src/packages/dialog/dialogwrap.tsx @@ -5,6 +5,7 @@ import { Content } from './content' import { OverlayProps, defaultOverlayProps } from '@/packages/overlay/overlay' import { ComponentDefaults } from '@/utils/typings' import Overlay from '@/packages/overlay' +import { mergeProps } from '@/utils/merge-props' interface DialogWrapProps extends OverlayProps { visible: boolean @@ -43,7 +44,7 @@ export const DialogWrap: FunctionComponent< onClose, onCancel, onOverlayClick, - } = props + } = mergeProps(defaultDialogProps, props) const onHandleClickOverlay = (e: any) => { if (closeOnOverlayClick && visible && e.target === e.currentTarget) { @@ -77,5 +78,4 @@ export const DialogWrap: FunctionComponent< ) } -DialogWrap.defaultProps = defaultDialogProps DialogWrap.displayName = 'NutDialogWrap'