synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
47 lines (46 loc) • 1.18 kB
JavaScript
import { jsx as e } from "react/jsx-runtime";
import { LOGIN_BACK_BUTTON_CLASS_NAME as n } from "../../utils/SynapseConstants.js";
import { IconButton as o } from "@mui/material";
import _ from "../IconSvg/IconSvg.js";
function s(t) {
switch (t) {
case "CHOOSE_AUTH_METHOD":
return "CHOOSE_AUTH_METHOD";
case "USERNAME_PASSWORD":
return "CHOOSE_AUTH_METHOD";
case "VERIFICATION_CODE":
return "CHOOSE_AUTH_METHOD";
case "RECOVERY_CODE":
return "VERIFICATION_CODE";
case "DISABLE_2FA_PROMPT":
return "VERIFICATION_CODE";
case "LOGGED_IN":
return "LOGGED_IN";
}
}
function a(t) {
const { step: r, onStepChange: O, sx: E } = t;
return r === "USERNAME_PASSWORD" || r === "VERIFICATION_CODE" || r === "RECOVERY_CODE" ? /* @__PURE__ */ e(
o,
{
className: n,
type: "button",
onClick: () => {
O(s(r));
},
sx: E,
children: /* @__PURE__ */ e(
_,
{
icon: "arrowBack",
wrap: !1,
sx: { height: "24px", width: "24px" }
}
)
}
) : null;
}
export {
a as default
};
//# sourceMappingURL=LoginFlowBackButton.js.map