handleEsc = (event, innerParams, dismissWith) => {
  if (callIfFunction(innerParams.allowEscapeKey)) {
    event.preventDefault()
    dismissWith(DismissReason.esc)
  }
}
@param {KeyboardEvent} event
@param {SweetAlertOptions} innerParams
@param {Function} dismissWith