|
|
|
@ -39,12 +39,10 @@ const SessionConfirmInner = (props: SessionConfirmDialogProps) => {
|
|
|
|
|
closeTheme = SessionButtonColor.Primary,
|
|
|
|
|
onClickOk,
|
|
|
|
|
onClickClose,
|
|
|
|
|
closeAfterClickOk = true,
|
|
|
|
|
hideCancel = false,
|
|
|
|
|
sessionIcon,
|
|
|
|
|
iconSize,
|
|
|
|
|
shouldShowConfirm,
|
|
|
|
|
// updateConfirmModal
|
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
const okText = props.okText || window.i18n('ok');
|
|
|
|
@ -55,19 +53,6 @@ const SessionConfirmInner = (props: SessionConfirmDialogProps) => {
|
|
|
|
|
|
|
|
|
|
const messageSubText = messageSub ? 'session-confirm-main-message' : 'subtle';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Calls close function after the ok button is clicked. If no close method specified, closes the modal
|
|
|
|
|
*/
|
|
|
|
|
const onClickOkWithClose = () => {
|
|
|
|
|
if (onClickOk) {
|
|
|
|
|
onClickOk();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (onClickClose) {
|
|
|
|
|
onClickClose();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const onClickOkHandler = () => {
|
|
|
|
|
if (onClickOk) {
|
|
|
|
|
onClickOk();
|
|
|
|
@ -80,6 +65,9 @@ const SessionConfirmInner = (props: SessionConfirmDialogProps) => {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Performs specified on close action then removes the modal.
|
|
|
|
|
*/
|
|
|
|
|
const onClickCancelHandler = () => {
|
|
|
|
|
if (onClickClose) {
|
|
|
|
|
onClickClose();
|
|
|
|
|