Notifications.d.ts 987 B

12345678910111213141516171819202122232425
  1. import * as React from 'react';
  2. import type { ReactElement } from 'react';
  3. import type { CSSMotionProps } from 'rc-motion';
  4. import type { OpenConfig, Placement, StackConfig } from './interface';
  5. export interface NotificationsProps {
  6. prefixCls?: string;
  7. motion?: CSSMotionProps | ((placement: Placement) => CSSMotionProps);
  8. container?: HTMLElement | ShadowRoot;
  9. maxCount?: number;
  10. className?: (placement: Placement) => string;
  11. style?: (placement: Placement) => React.CSSProperties;
  12. onAllRemoved?: VoidFunction;
  13. stack?: StackConfig;
  14. renderNotifications?: (node: ReactElement, info: {
  15. prefixCls: string;
  16. key: React.Key;
  17. }) => ReactElement;
  18. }
  19. export interface NotificationsRef {
  20. open: (config: OpenConfig) => void;
  21. close: (key: React.Key) => void;
  22. destroy: () => void;
  23. }
  24. declare const Notifications: React.ForwardRefExoticComponent<NotificationsProps & React.RefAttributes<NotificationsRef>>;
  25. export default Notifications;