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

53 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
import * as React from 'react';
import { CSSTransitionProps } from '../csstransition';
import { IconType } from "../utils";
type ConfirmPopupTemplateType = React.ReactNode | ((options: ConfirmPopupOptions) => React.ReactNode);
type ConfirmPopupAppendToType = 'self' | HTMLElement | undefined | null;
interface ConfirmPopupOptions {
accept(): void;
reject(): void;
className: string;
acceptClassName: string;
rejectClassName: string;
acceptLabel: string;
rejectLabel: string;
element: React.ReactNode;
props: ConfirmPopupProps;
[key: string]: any;
}
export interface ConfirmPopupProps {
target?: HTMLElement;
visible?: boolean;
message?: ConfirmPopupTemplateType;
rejectLabel?: string;
acceptLabel?: string;
icon?: IconType<ConfirmPopupProps>;
rejectIcon?: IconType<ConfirmPopupProps>;
acceptIcon?: IconType<ConfirmPopupProps>;
rejectClassName?: string;
acceptClassName?: string;
className?: string;
style?: object;
appendTo?: ConfirmPopupAppendToType;
dismissable?: boolean;
footer?: ConfirmPopupTemplateType;
transitionOptions?: CSSTransitionProps;
onShow?(): void;
onHide?(result: string): void;
accept?(): void;
reject?(): void;
}
interface ConfirmPopupReturn {
show(): void;
hide(): void;
}
export declare class ConfirmPopup extends React.Component<ConfirmPopupProps, any> { }
export declare function confirmPopup(props: ConfirmPopupProps): ConfirmPopupReturn;