UNPKG

zent

Version:

一套前端设计语言和基于React的实现

19 lines (18 loc) 780 B
/// <reference types="react" /> import { IPopState } from './Pop'; export declare type IPopActionCallback = (() => Promise<void>) | ((close: () => void) => void); export interface IChangePending { (key: keyof IPopState, state: boolean, callback?: () => void): void; } export interface IPopActionProps { type: 'primary' | 'default' | 'danger' | 'success' | 'secondary'; onConfirm?: IPopActionCallback; onCancel?: IPopActionCallback; confirmText?: string; cancelText?: string; confirmPending: boolean; cancelPending: boolean; changePending: IChangePending; } declare function PopAction({ type, onConfirm, onCancel, confirmText, cancelText, confirmPending, cancelPending, changePending, }: IPopActionProps): JSX.Element; export default PopAction;