Files
reui-blocks/blocks/signup5.tsx
T

137 lines
4.3 KiB
TypeScript

import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { cn } from "@/lib/utils";
interface Signup5Props {
className?: string;
heading?: string;
logo: {
url: string;
src: string;
alt: string;
title?: string;
};
buttonText?: string;
emailLabel?: string;
passwordLabel?: string;
emailPlaceholder?: string;
passwordPlaceholder?: string;
googleText?: string;
googleIconAlt?: string;
githubText?: string;
githubIconAlt?: string;
facebookText?: string;
facebookIconAlt?: string;
signupText?: string;
signupUrl?: string;
loginLinkText?: string;
}
const Signup5 = ({
className,
heading = "ایجاد حساب کاربری",
logo = {
url: "https://www.ShadcnBlocks",
src: "/block-media/shadcnblocks/block/logos/ShadcnBlocks-logo.svg",
alt: "نام تجاری",
title: "نوافروش",
},
buttonText = "شروع رایگان",
emailLabel = "ایمیل",
passwordLabel = "رمز عبور",
emailPlaceholder = "ایمیل",
passwordPlaceholder = "رمز عبور (حداقل ۸ کاراکتر)",
googleText = "ادامه با گوگل",
googleIconAlt = "گوگل",
githubText = "ثبت‌نام با گیت‌هاب",
githubIconAlt = "گیت‌هاب",
facebookText = "ثبت‌نام با فیسبوک",
facebookIconAlt = "فیسبوک",
signupText = "قبلاً ثبت‌نام کرده‌اید؟",
signupUrl = "https://ShadcnBlocks",
loginLinkText = "ورود به حساب",
}: Signup5Props) => {
return (
<section
dir="rtl"
lang="fa"
className={cn("h-screen bg-background", className)}
>
<div className="flex h-full items-center justify-center">
<div className="flex flex-col items-center gap-6 lg:justify-start">
<a href={logo.url}>
<img
src={logo.src}
alt={logo.alt}
title={logo.title}
className="h-10 dark:invert"
/>
</a>
{heading && <h1 className="text-xl font-semibold">{heading}</h1>}
<div className="flex w-full max-w-sm min-w-sm flex-col items-center gap-y-4 rounded-lg bg-muted px-6 py-12">
<div className="flex w-full flex-col gap-2">
<Label>{emailLabel}</Label>
<Input
type="email"
placeholder={emailPlaceholder}
className="bg-background text-sm"
required
/>
</div>
<div className="flex w-full flex-col gap-2">
<Label>{passwordLabel}</Label>
<Input
type="password"
placeholder={passwordPlaceholder}
className="bg-background text-sm"
required
/>
</div>
<Button type="submit" className="w-full">
{buttonText}
</Button>
<div className="flex w-full flex-col gap-2">
<Button type="button" className="w-full" variant="outline">
<img
src="/block-media/shadcnblocks/block/logos/google-icon.svg"
className="size-5"
alt={googleIconAlt}
/>
{googleText}
</Button>
<Button type="button" className="w-full" variant="outline">
<img
src="/block-media/shadcnblocks/block/logos/facebook-icon.svg"
className="size-5"
alt={facebookIconAlt}
/>
{facebookText}
</Button>
<Button type="button" className="w-full" variant="outline">
<img
src="/block-media/shadcnblocks/block/logos/github-icon.svg"
className="size-5"
alt={githubIconAlt}
/>
{githubText}
</Button>
</div>
</div>
<div className="flex justify-center gap-1 text-sm text-muted-foreground">
<p>{signupText}</p>
<a
href={signupUrl}
className="font-medium text-primary hover:underline"
>
{loginLinkText}
</a>
</div>
</div>
</div>
</section>
);
};
export { Signup5 };