@coko/client
Version:
Client side common code for coko apps
55 lines (53 loc) • 1.65 kB
JavaScript
import { grid as e } from "../../toolkit/themeHelper.js";
import "../../toolkit/index.js";
import t from "../common/Button.js";
import n from "../common/Link.js";
import r from "../common/Form.js";
import "../common/index.js";
import i from "styled-components";
import { jsx as a, jsxs as o } from "react/jsx-runtime";
//#region src/ui/authentication/AuthenticationForm.tsx
var s = i.div``, c = i(t)`
width: 100%;
`, l = i.div`
display: flex;
justify-content: ${(e) => e.$showForgotPassword ? "space-between" : "flex-end"};
margin-top: ${e(4)};
`, u = i.div`
> a {
color: ${(e) => e.theme.colorText};
}
`, d = i.div`
font-weight: bold;
> a {
color: ${(e) => e.theme.colorText};
}
`, f = (e) => {
let { alternativeActionLabel: t, alternativeActionLink: i, className: f, children: p, errorMessage: m, forgotPasswordUrl: h = "/request-password-reset", hasError: g = !1, loading: _ = !1, onSubmit: v, showForgotPassword: y = !1, submitButtonLabel: b = "Submit" } = e;
return /* @__PURE__ */ o(s, {
className: f,
children: [/* @__PURE__ */ o(r, {
layout: "vertical",
onFinish: v,
ribbonMessage: m,
submissionStatus: g ? "error" : null,
children: [p, /* @__PURE__ */ a(c, {
htmlType: "submit",
loading: _,
type: "primary",
children: b
})]
}), t && i && /* @__PURE__ */ o(l, {
$showForgotPassword: y,
children: [y && /* @__PURE__ */ a(u, { children: /* @__PURE__ */ a(n, {
to: h,
children: "Forgot your password?"
}) }), /* @__PURE__ */ a(d, { children: /* @__PURE__ */ a(n, {
to: i,
children: t
}) })]
})]
});
};
//#endregion
export { f as default };