UNPKG

@amaui/ui-react

Version:
36 lines (35 loc) 968 B
import React from 'react'; import { TMethod } from '@amaui/utils'; import { IBaseElement } from '../types'; export interface IConfirmOpen { modal?: (promise: IConfirmPromiseArgument) => React.ReactElement; name?: string | boolean | React.ReactElement; description?: string | React.ReactElement; buttons?: { positive?: { text?: string; }; negative?: { text?: string; }; }; throwError?: boolean; ButtonNegativeProps?: any; ButtonPositiveProps?: any; [p: string]: any; } export interface IConfirmPromiseArgument { resolve: TMethod; reject: TMethod; } export interface IConfirmValue { open: (value?: IConfirmOpen) => Promise<any>; close: (confirmed?: boolean) => void; } export interface IConfirm extends IBaseElement { throwError?: boolean; onOpen?: () => any; onClose?: () => any; } declare const Confirm: React.FC<IConfirm>; export default Confirm;