@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
20 lines (19 loc) • 667 B
TypeScript
import { FunctionComponent } from 'react';
import { BasicComponent } from '../../utils/typings';
export type NotifyPosition = 'top' | 'bottom';
export type NotifyType = 'primary' | 'success' | 'danger' | 'warning';
export interface NotifyProps extends BasicComponent {
id?: string;
duration: number;
type: NotifyType;
position: NotifyPosition;
visible: boolean;
onClose: () => void;
onClick: () => void;
}
export declare const Notify: FunctionComponent<Partial<NotifyProps>> & {
open: typeof open;
close: typeof close;
};
export declare function open(selector: string): void;
export declare function close(selector: string): void;