UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

33 lines (32 loc) 1.07 kB
import { CSSProperties, ReactNode } from 'react'; import { ConfigProps as ConfigOptions, NotificationPlacement } from 'choerodon-ui/shared/notification-manager'; export { NotificationPlacement }; export declare type IconType = 'success' | 'info' | 'error' | 'warning'; export declare type ConfigProps = Partial<ConfigOptions>; export interface ArgsProps { message: ReactNode; description: ReactNode; btn?: ReactNode; key?: string; onClose?: () => void; duration?: number | null; icon?: ReactNode; placement?: NotificationPlacement; style?: CSSProperties; prefixCls?: string; className?: string; readonly type?: IconType; } export interface NotificationApi { success(args: ArgsProps): void; error(args: ArgsProps): void; info(args: ArgsProps): void; warn(args: ArgsProps): void; warning(args: ArgsProps): void; open(args: ArgsProps): void; close(key: string): void; config(options: ConfigProps): void; destroy(): void; } declare const _default: NotificationApi; export default _default;