@coko/client
Version:
Client side common code for coko apps
31 lines (30 loc) • 938 B
JavaScript
import e from "../common/Spin.js";
import t from "../common/Result.js";
import n from "styled-components";
import { jsx as r } from "react/jsx-runtime";
//#region src/ui/authentication/ProviderConnection.tsx
var i = n.div``, a = (n) => {
let { className: a, closeOnSuccess: o = !1, connecting: s = !1, redirectUrlLabel: c, successfullyConnected: l = !1 } = n, u;
if (s) u = {
icon: /* @__PURE__ */ r(e, { spinning: !0 }),
title: "Authenticating..."
};
else if (l) {
let e = "";
e = o ? "This window should close automatically..." : c ? `Redirecting you to ${c}...` : "Redirecting you...", u = {
status: "success",
subTitle: e,
title: "Connection established!"
};
} else u = {
status: "error",
subTitle: "Try reconnecting or contact us",
title: "Something went wrong!"
};
return /* @__PURE__ */ r(i, {
className: a,
children: /* @__PURE__ */ r(t, { ...u })
});
};
//#endregion
export { a as default };