diff --git a/components/notification/index.tsx b/components/notification/index.tsx index a4b302719a..3f5cfe6e9b 100755 --- a/components/notification/index.tsx +++ b/components/notification/index.tsx @@ -34,10 +34,10 @@ let taskQueue: Task[] = []; let defaultGlobalConfig: GlobalConfigProps = {}; function getGlobalContext() { - const { getContainer, rtl, maxCount, top, bottom } = defaultGlobalConfig; + const { getContainer, rtl, maxCount, top, bottom, showProgress, pauseOnHover } = defaultGlobalConfig; const mergedContainer = getContainer?.() || document.body; - return { getContainer: () => mergedContainer, rtl, maxCount, top, bottom }; + return { getContainer: () => mergedContainer, rtl, maxCount, top, bottom, showProgress, pauseOnHover }; } interface GlobalHolderRef { diff --git a/components/notification/useNotification.tsx b/components/notification/useNotification.tsx index e65e354748..cc24b035bd 100644 --- a/components/notification/useNotification.tsx +++ b/components/notification/useNotification.tsx @@ -65,6 +65,8 @@ const Holder = React.forwardRef((props, ref) => { onAllRemoved, stack, duration, + pauseOnHover = true, + showProgress, } = props; const { getPrefixCls, getPopupContainer, notification, direction } = useContext(ConfigContext); const [, token] = useToken(); @@ -89,9 +91,10 @@ const Holder = React.forwardRef((props, ref) => { closable: true, closeIcon: getCloseIcon(prefixCls), duration: duration ?? DEFAULT_DURATION, - pauseOnHover: true, getContainer: () => staticGetContainer?.() || getPopupContainer?.() || document.body, maxCount, + pauseOnHover, + showProgress, onAllRemoved, renderNotifications, stack: