import React from "react"; import { Input } from "baseui/input"; import { LabelMedium } from "baseui/typography"; import { IconEye, IconEyeOff, IconLock } from "@tabler/icons-react"; import { Button } from "baseui/button"; interface LoginFormProps { handle: string; setHandle: (value: string) => void; password: string; setPassword: (value: string) => void; passwordLogin: boolean; setPasswordLogin: (value: boolean) => void; onLogin: () => void; onCreateAccount: () => void; } const LoginForm: React.FC = ({ handle, setHandle, password, setPassword, passwordLogin, setPasswordLogin, onLogin, onCreateAccount, }) => { return (
Handle setPasswordLogin(!passwordLogin)} > {passwordLogin ? "OAuth Login" : "Password Login"}
@
} placeholder=".bsky.social" value={handle} onChange={(e) => setHandle(e.target.value)} overrides={{ Root: { style: { backgroundColor: "var(--color-input-background)", borderColor: "var(--color-input-background)", }, }, StartEnhancer: { style: { backgroundColor: "var(--color-input-background)", }, }, InputContainer: { style: { backgroundColor: "var(--color-input-background)", }, }, Input: { style: { color: "var(--color-text)", caretColor: "var(--color-text)", }, }, }} /> {passwordLogin && (
} type="password" placeholder="Password" value={password} onChange={(e) => setPassword(e.target.value)} overrides={{ Root: { style: { backgroundColor: "var(--color-input-background)", borderColor: "var(--color-input-background)", marginTop: "1rem", }, }, StartEnhancer: { style: { backgroundColor: "var(--color-input-background)", }, }, InputContainer: { style: { backgroundColor: "var(--color-input-background)", }, }, Input: { style: { color: "var(--color-text)", caretColor: "var(--color-text)", }, }, MaskToggleHideIcon: { component: () => ( ), }, MaskToggleShowIcon: { component: () => ( ), }, }} /> )} Don't have an atproto handle yet?
You can create one at{" "} selfhosted.social ,{" "} Bluesky {" "} or any other AT Protocol service.
); }; export default LoginForm;