Files
rowy/src/components/ConfirmationDialog/props.ts

27 lines
664 B
TypeScript
Raw Normal View History

2021-09-01 15:54:20 +10:00
export type confirmationProps =
2021-09-01 15:59:30 +10:00
| {
title?: string;
customBody?: React.ReactNode;
2021-09-01 15:59:30 +10:00
body?: string;
cancel?: string;
hideCancel?: boolean;
2021-09-01 15:59:30 +10:00
confirm?: string | JSX.Element;
confirmationCommand?: string;
handleConfirm: () => void;
open?: Boolean;
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
};