UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

53 lines (52 loc) 1.62 kB
import { Auth, AuthProvider, signInWithPopup, signInWithEmailAndPassword } from 'firebase/auth'; import { ReactNode } from 'react'; import { ButtonProps } from '../../../components/Button'; export declare const messages: { signIn_title: string; signIn_provider: string; signIn_separator: string; signIn_field_email: string; signIn_field_password: string; signIn_submit: string; signIn_formError_firebase: string; signIn_formError_unknown: string; signIn_formError_invalidCredentials: string; }; export interface SignInFormProps { /** * Firebase's Auth object. */ auth: Auth; /** * List of SSO providers. */ providers: Array<{ provider: AuthProvider; name: string; icon?: ReactNode; }>; /** * If false, the email/password form will not be displayed. * Can be used for showing email/password form just for dev environments. * * @default true */ enableEmailPassword?: boolean; /** * Firebase's signInWithPopup function. */ signInWithPopup: typeof signInWithPopup; /** * Firebase's signInWithEmailAndPassword function. */ signInWithEmailAndPassword: typeof signInWithEmailAndPassword; className?: string; /** * Size of submit and SSO buttons. */ buttonSize?: ButtonProps["size"]; } /** * Complete Sign In Form component for Firebase. */ export declare const SignInForm: ({ auth, providers, enableEmailPassword, className, signInWithPopup, signInWithEmailAndPassword, buttonSize, }: SignInFormProps) => import("react").JSX.Element;