lijianan
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
4 additions and
4 deletions
-
components/notification/index.tsx
-
components/notification/interface.ts
-
package.json
|
|
@ -1,8 +1,8 @@ |
|
|
|
import { render } from 'rc-util/lib/React/render'; |
|
|
|
import * as React from 'react'; |
|
|
|
import ConfigProvider, { globalConfig, warnContext } from '../config-provider'; |
|
|
|
import type { ArgsProps, GlobalConfigProps, NotificationInstance } from './interface'; |
|
|
|
import PurePanel from './PurePanel'; |
|
|
|
import type { ArgsProps, GlobalConfigProps, NotificationInstance } from './interface'; |
|
|
|
import useNotification, { useInternalNotification } from './useNotification'; |
|
|
|
|
|
|
|
let notification: GlobalNotification | null = null; |
|
|
@ -58,7 +58,7 @@ interface GlobalHolderRef { |
|
|
|
|
|
|
|
const GlobalHolder = React.forwardRef<GlobalHolderRef, {}>((_, ref) => { |
|
|
|
const [prefixCls, setPrefixCls] = React.useState<string>(); |
|
|
|
const [container, setContainer] = React.useState<HTMLElement>(); |
|
|
|
const [container, setContainer] = React.useState<HTMLElement | ShadowRoot>(); |
|
|
|
const [maxCount, setMaxCount] = React.useState<number>(); |
|
|
|
const [rtl, setRTL] = React.useState<boolean>(); |
|
|
|
const [top, setTop] = React.useState<number>(); |
|
|
|
|
|
@ -59,7 +59,7 @@ export interface NotificationConfig { |
|
|
|
top?: number; |
|
|
|
bottom?: number; |
|
|
|
prefixCls?: string; |
|
|
|
getContainer?: () => HTMLElement; |
|
|
|
getContainer?: () => HTMLElement | ShadowRoot; |
|
|
|
placement?: NotificationPlacement; |
|
|
|
maxCount?: number; |
|
|
|
rtl?: boolean; |
|
|
|
|
|
@ -133,7 +133,7 @@ |
|
|
|
"rc-mentions": "~2.2.0", |
|
|
|
"rc-menu": "~9.8.3", |
|
|
|
"rc-motion": "^2.7.3", |
|
|
|
"rc-notification": "~5.0.0", |
|
|
|
"rc-notification": "~5.0.4", |
|
|
|
"rc-pagination": "~3.3.1", |
|
|
|
"rc-picker": "~3.6.1", |
|
|
|
"rc-progress": "~3.4.1", |
|
|
|