amis-rpc-design/node_modules/rc-notification/lib/Notifications.d.ts
2023-10-07 19:42:30 +08:00

25 lines
944 B
TypeScript

import * as React from 'react';
import { ReactElement } from 'react';
import type { CSSMotionProps } from 'rc-motion';
import type { OpenConfig, Placement } from './interface';
export interface NotificationsProps {
prefixCls?: string;
motion?: CSSMotionProps | ((placement: Placement) => CSSMotionProps);
container?: HTMLElement | ShadowRoot;
maxCount?: number;
className?: (placement: Placement) => string;
style?: (placement: Placement) => React.CSSProperties;
onAllRemoved?: VoidFunction;
renderNotifications?: (node: ReactElement, info: {
prefixCls: string;
key: React.Key;
}) => ReactElement;
}
export interface NotificationsRef {
open: (config: OpenConfig) => void;
close: (key: React.Key) => void;
destroy: () => void;
}
declare const Notifications: React.ForwardRefExoticComponent<NotificationsProps & React.RefAttributes<NotificationsRef>>;
export default Notifications;