Skip to content

Commit

Permalink
fix(dialog): remove defaultprops (jdf2e#2639)
Browse files Browse the repository at this point in the history
  • Loading branch information
oasis-cloud authored Oct 12, 2024
1 parent 7b1ed92 commit efaa3fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/packages/dialog/dialogwrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -77,5 +78,4 @@ export const DialogWrap: FunctionComponent<
</>
)
}
DialogWrap.defaultProps = defaultDialogProps
DialogWrap.displayName = 'NutDialogWrap'

0 comments on commit efaa3fa

Please sign in to comment.