129 lines
4.1 KiB
TypeScript
129 lines
4.1 KiB
TypeScript
import { FaFacebook, FaGithub, FaGoogle } from "react-icons/fa";
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
import { Input } from "@/components/ui/input";
|
|
import { Label } from "@/components/ui/label";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
interface Signup3Props {
|
|
heading?: string;
|
|
logo: {
|
|
url: string;
|
|
src: string;
|
|
alt: string;
|
|
title: string;
|
|
};
|
|
buttonText?: string;
|
|
emailLabel?: string;
|
|
passwordLabel?: string;
|
|
emailPlaceholder?: string;
|
|
passwordPlaceholder?: string;
|
|
googleText?: string;
|
|
githubText?: string;
|
|
facebookText?: string;
|
|
loginPromptText?: string;
|
|
loginText?: string;
|
|
loginUrl?: string;
|
|
className?: string;
|
|
}
|
|
|
|
const Signup3 = ({
|
|
heading = "ایجاد حساب کاربری",
|
|
logo = {
|
|
url: "https://www.ShadcnBlocks",
|
|
src: "/block-media/shadcnblocks/block/logos/ShadcnBlockscom-icon.svg",
|
|
alt: "نام تجاری",
|
|
title: "نوافروش",
|
|
},
|
|
buttonText = "شروع رایگان",
|
|
emailLabel = "ایمیل",
|
|
passwordLabel = "رمز عبور",
|
|
emailPlaceholder = "ایمیل",
|
|
passwordPlaceholder = "رمز عبور (حداقل ۸ کاراکتر)",
|
|
googleText = "ادامه با گوگل",
|
|
githubText = "ثبتنام با گیتهاب",
|
|
facebookText = "ثبتنام با فیسبوک",
|
|
loginPromptText = "قبلاً ثبتنام کردهاید؟",
|
|
loginText = "ورود",
|
|
loginUrl = "https://ShadcnBlocks",
|
|
className,
|
|
}: Signup3Props) => {
|
|
return (
|
|
<section
|
|
dir="rtl"
|
|
lang="fa"
|
|
className={cn("h-screen", className)}
|
|
>
|
|
<div className="flex h-full items-center justify-center">
|
|
<div className="flex w-full max-w-sm flex-col items-center gap-y-8">
|
|
<div className="flex flex-col items-center gap-y-2">
|
|
<div className="flex items-center gap-1 lg:justify-start">
|
|
<a href={logo.url}>
|
|
<img
|
|
src={logo.src}
|
|
alt={logo.alt}
|
|
title={logo.title}
|
|
className="h-12"
|
|
/>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div className="flex w-full flex-col gap-8 rounded-md bg-muted px-6 py-8">
|
|
<div className="flex flex-col items-center gap-y-2">
|
|
{heading && <h1 className="text-xl font-semibold">{heading}</h1>}
|
|
</div>
|
|
<div className="flex flex-col gap-4">
|
|
<div className="flex flex-col gap-2">
|
|
<Label>{emailLabel}</Label>
|
|
<Input
|
|
type="email"
|
|
placeholder={emailPlaceholder}
|
|
required
|
|
className="bg-background"
|
|
/>
|
|
</div>
|
|
<div className="flex flex-col gap-2">
|
|
<Label>{passwordLabel}</Label>
|
|
<Input
|
|
type="password"
|
|
placeholder={passwordPlaceholder}
|
|
required
|
|
className="bg-background"
|
|
/>
|
|
</div>
|
|
<Button type="submit" className="mt-2 w-full">
|
|
{buttonText}
|
|
</Button>
|
|
<div className="flex flex-col gap-2">
|
|
<Button variant="outline" className="w-full">
|
|
<FaGoogle className="size-4" />
|
|
{googleText}
|
|
</Button>
|
|
<Button variant="outline" className="w-full">
|
|
<FaGithub className="size-4" />
|
|
{githubText}
|
|
</Button>
|
|
<Button variant="outline" className="w-full">
|
|
<FaFacebook className="size-4" />
|
|
{facebookText}
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div className="flex justify-center gap-1 text-sm text-muted-foreground">
|
|
<p>{loginPromptText}</p>
|
|
<a
|
|
href={loginUrl}
|
|
className="font-medium text-primary hover:underline"
|
|
>
|
|
{loginText}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
);
|
|
};
|
|
|
|
export { Signup3 };
|