import { IconChevronRight, IconWallet } from "@/assets/icons"; import { Button, EmailLogin, SignInAnonymously, SocialLogins, } from "@/components"; import type { AuthModalConfig } from "@/types"; /** * Props for the AuthOptions component. * * @interface AuthOptionsProps * @property {AuthModalConfig} config - Configuration for the authentication modal. * @property {Function} onConnectWallet - Callback function to handle wallet connection. * @property {Function} onSignupEmail - Callback function to handle email signup. */ export interface AuthOptionsProps { config: AuthModalConfig; onConnectWallet: any; onSignupEmail: any; } /** * AuthOptions component renders various authentication options based on the provided configuration. * * @param {AuthOptionsProps} props - The properties for the AuthOptions component. * @param {object} props.config - Configuration object for the authentication options. * @param {function} props.onConnectWallet - Callback function to handle wallet connection. * @param {function} props.onSignupEmail - Callback function to handle email signup. * * @returns {JSX.Element} The rendered AuthOptions component. * * @component * @example * const config = { * appearance: { modal: { padding: '4' } }, * socialLogins: ['google', 'facebook'], * walletConnectEnabled: true, * anonymousLoginEnabled: true, * }; * const handleConnectWallet = () => { ... }; * const handleSignupEmail = () => { ... }; * * */ export const AuthOptions = ({ config, onConnectWallet, onSignupEmail, }: AuthOptionsProps) => (
{config.socialLogins && config.socialLogins.length > 0 && (
)} {config.walletConnectEnabled && ( )} {config.anonymousLoginEnabled && }

Sign Up

);