katoikia-app/web-ui/web-react/node_modules/primereact/confirmdialog/confirmdialog.d.ts

52 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
import * as React from 'react';
import { DialogProps } from '../dialog';
import {IconType} from "../utils";
type ConfirmDialogTemplateType = React.ReactNode | ((options: ConfirmDialogOptions) => React.ReactNode);
type ConfirmDialogAppendToType = 'self' | HTMLElement | undefined | null;
interface ConfirmDialogBreakpoints {
[key: string]: string;
}
interface ConfirmDialogOptions {
accept(): void;
reject(): void;
acceptClassName: string;
rejectClassName: string;
acceptLabel: string;
rejectLabel: string;
element: React.ReactNode;
props: ConfirmDialogProps;
[key: string]: any;
}
export interface ConfirmDialogProps extends Omit<DialogProps, 'onHide'> {
visible?: boolean;
message?: ConfirmDialogTemplateType;
rejectLabel?: string;
acceptLabel?: string;
icon?: IconType<ConfirmDialogProps>;
rejectIcon?: IconType<ConfirmDialogProps>;
acceptIcon?: IconType<ConfirmDialogProps>;
rejectClassName?: string;
acceptClassName?: string;
appendTo?: ConfirmDialogAppendToType;
className?: string;
footer?: ConfirmDialogTemplateType;
breakpoints?: ConfirmDialogBreakpoints;
onHide?(result: string): void;
accept?(): void;
reject?(): void;
}
interface ConfirmDialogReturn {
show(): void;
hide(): void;
}
export declare class ConfirmDialog extends React.Component<ConfirmDialogProps, any> { }
export declare function confirmDialog(props: ConfirmDialogProps): ConfirmDialogReturn;