2021-09-01 15:54:20 +10:00
|
|
|
export type confirmationProps =
|
2021-09-01 15:59:30 +10:00
|
|
|
| {
|
|
|
|
|
title?: string;
|
2021-09-20 16:49:38 +10:00
|
|
|
customBody?: React.ReactNode;
|
2021-09-01 15:59:30 +10:00
|
|
|
body?: string;
|
|
|
|
|
cancel?: string;
|
|
|
|
|
confirm?: string | JSX.Element;
|
|
|
|
|
confirmationCommand?: string;
|
|
|
|
|
handleConfirm: () => void;
|
|
|
|
|
open?: Boolean;
|
2021-09-20 16:49:38 +10:00
|
|
|
confirmColor?: string;
|
2021-09-01 15:59:30 +10:00
|
|
|
}
|
|
|
|
|
| undefined;
|
2021-09-01 15:54:20 +10:00
|
|
|
export interface IConfirmation {
|
2021-09-01 15:59:30 +10:00
|
|
|
dialogProps?: confirmationProps;
|
|
|
|
|
handleClose: () => void;
|
|
|
|
|
open: boolean;
|
|
|
|
|
requestConfirmation: (props: confirmationProps) => void;
|
2021-09-01 15:54:20 +10:00
|
|
|
}
|
|
|
|
|
export const CONFIRMATION_EMPTY_STATE = {
|
2021-09-01 15:59:30 +10:00
|
|
|
dialogProps: undefined,
|
|
|
|
|
open: false,
|
|
|
|
|
handleClose: () => {},
|
|
|
|
|
requestConfirmation: () => {},
|
2021-09-01 15:54:20 +10:00
|
|
|
};
|