mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-28 19:50:34 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 additions and 0 deletions
34
package/@stackframe/react/dist/esm/components/passkey-button.js
vendored
Normal file
34
package/@stackframe/react/dist/esm/components/passkey-button.js
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"use client";
|
||||
"use client";
|
||||
|
||||
// src/components/passkey-button.tsx
|
||||
import { Button } from "@stackframe/stack-ui";
|
||||
import { useId } from "react";
|
||||
import { useStackApp } from "..";
|
||||
import { useTranslation } from "../lib/translations";
|
||||
import { KeyRound } from "lucide-react";
|
||||
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
||||
function PasskeyButton({
|
||||
type
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const stackApp = useStackApp();
|
||||
const styleId = useId().replaceAll(":", "-");
|
||||
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
||||
Button,
|
||||
{
|
||||
onClick: async () => {
|
||||
await stackApp.signInWithPasskey();
|
||||
},
|
||||
className: `stack-oauth-button-${styleId} stack-scope`,
|
||||
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center w-full gap-4", children: [
|
||||
/* @__PURE__ */ jsx(KeyRound, {}),
|
||||
/* @__PURE__ */ jsx("span", { className: "flex-1", children: type === "sign-up" ? t("Sign up with Passkey") : t("Sign in with Passkey") })
|
||||
] })
|
||||
}
|
||||
) });
|
||||
}
|
||||
export {
|
||||
PasskeyButton
|
||||
};
|
||||
//# sourceMappingURL=passkey-button.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue