synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
45 lines (44 loc) • 1.06 kB
JavaScript
import { jsxs as c, jsx as r } from "react/jsx-runtime";
import { Box as s, Button as d } from "@mui/material";
import { useState as m } from "react";
import u from "../TextField/TextField.js";
const p = 19;
function v(i) {
const { onSubmit: n, loginIsPending: o } = i, [e, a] = m("");
return /* @__PURE__ */ c(s, { children: [
/* @__PURE__ */ r(
u,
{
placeholder: "Enter backup code",
value: e,
onChange: (t) => {
const l = t.target.value.toLowerCase().replace(/[^a-z0-9-]/gi, "");
a(l);
}
}
),
/* @__PURE__ */ r(
d,
{
fullWidth: !0,
type: "submit",
color: "primary",
variant: "contained",
sx: {
height: "50px",
mt: 4,
mb: 2
},
disabled: e.length !== p || o,
onClick: (t) => {
t.preventDefault(), n(e);
},
children: o ? "Verifying..." : "Submit"
}
)
] });
}
export {
v as default
};
//# sourceMappingURL=RecoveryCodeForm.js.map