yqcloud-ui
Version:
An enterprise-class UI design language and React-based implementation
26 lines (25 loc) • 2.3 kB
TypeScript
/// <reference types="react" />
import * as React from 'react';
export declare type ConfigOnClose = () => void;
export interface ConfigOptions {
top?: number;
duration?: number;
prefixCls?: string;
getContainer?: () => HTMLElement;
transitionName?: string;
/**
* 消息距离视窗位置
*/
bottom?: number;
}
declare const _default: {
info(content: React.ReactNode, duration?: number | (() => void) | undefined, onClose?: ConfigOnClose | undefined, placement?: "left" | "right" | "bottom" | "top" | "bottomLeft" | "topLeft" | "topRight" | "bottomRight" | "leftTop" | "rightTop" | "leftBottom" | "rightBottom" | undefined): () => void;
success(content: React.ReactNode, duration?: number | (() => void) | undefined, onClose?: ConfigOnClose | undefined, placement?: "left" | "right" | "bottom" | "top" | "bottomLeft" | "topLeft" | "topRight" | "bottomRight" | "leftTop" | "rightTop" | "leftBottom" | "rightBottom" | undefined): () => void;
error(content: React.ReactNode, duration?: number | (() => void) | undefined, onClose?: ConfigOnClose | undefined, placement?: "left" | "right" | "bottom" | "top" | "bottomLeft" | "topLeft" | "topRight" | "bottomRight" | "leftTop" | "rightTop" | "leftBottom" | "rightBottom" | undefined): () => void;
warn(content: React.ReactNode, duration?: number | (() => void) | undefined, onClose?: ConfigOnClose | undefined, placement?: "left" | "right" | "bottom" | "top" | "bottomLeft" | "topLeft" | "topRight" | "bottomRight" | "leftTop" | "rightTop" | "leftBottom" | "rightBottom" | undefined): () => void;
warning(content: React.ReactNode, duration?: number | (() => void) | undefined, onClose?: ConfigOnClose | undefined, placement?: "left" | "right" | "bottom" | "top" | "bottomLeft" | "topLeft" | "topRight" | "bottomRight" | "leftTop" | "rightTop" | "leftBottom" | "rightBottom" | undefined): () => void;
loading(content: React.ReactNode, duration?: number | (() => void) | undefined, onClose?: ConfigOnClose | undefined, placement?: "left" | "right" | "bottom" | "top" | "bottomLeft" | "topLeft" | "topRight" | "bottomRight" | "leftTop" | "rightTop" | "leftBottom" | "rightBottom" | undefined): () => void;
config(options: ConfigOptions): void;
destroy(): void;
};
export default _default;