113 lines
3.4 KiB
TypeScript
113 lines
3.4 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 Signup2Props {
|
|
heading?: string;
|
|
logo: {
|
|
url: string;
|
|
src: string;
|
|
alt: string;
|
|
title?: string;
|
|
};
|
|
buttonText?: string;
|
|
emailLabel?: string;
|
|
passwordLabel?: string;
|
|
confirmPasswordLabel?: string;
|
|
emailPlaceholder?: string;
|
|
passwordPlaceholder?: string;
|
|
confirmPasswordPlaceholder?: string;
|
|
googleText?: string;
|
|
signupText?: string;
|
|
signupUrl?: string;
|
|
loginLinkText?: string;
|
|
className?: string;
|
|
}
|
|
|
|
const Signup2 = ({
|
|
heading = "ایجاد حساب کاربری",
|
|
logo = {
|
|
url: "https://www.ShadcnBlocks",
|
|
src: "/block-media/shadcnblocks/block/logos/ShadcnBlockscom-wordmark.svg",
|
|
alt: "نام تجاری",
|
|
title: "نوافروش",
|
|
},
|
|
buttonText = "شروع رایگان",
|
|
emailLabel = "ایمیل",
|
|
passwordLabel = "رمز عبور",
|
|
confirmPasswordLabel = "تکرار رمز عبور",
|
|
emailPlaceholder = "ایمیل",
|
|
passwordPlaceholder = "رمز عبور (حداقل ۸ کاراکتر)",
|
|
confirmPasswordPlaceholder = "تأیید رمز عبور",
|
|
signupText = "قبلاً ثبتنام کردهاید؟",
|
|
signupUrl = "https://ShadcnBlocks",
|
|
loginLinkText = "ورود به حساب",
|
|
className,
|
|
}: Signup2Props) => {
|
|
return (
|
|
<section
|
|
dir="rtl"
|
|
lang="fa"
|
|
className={cn("h-screen bg-muted", 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>
|
|
<div className="flex w-full max-w-sm min-w-sm flex-col items-center gap-y-4 rounded-md border border-muted bg-background px-6 py-8 shadow-md">
|
|
{heading && <h1 className="text-xl font-semibold">{heading}</h1>}
|
|
<div className="flex w-full flex-col gap-2">
|
|
<Label>{emailLabel}</Label>
|
|
<Input
|
|
type="email"
|
|
placeholder={emailPlaceholder}
|
|
className="text-sm"
|
|
required
|
|
/>
|
|
</div>
|
|
<div className="flex w-full flex-col gap-2">
|
|
<Label>{passwordLabel}</Label>
|
|
<Input
|
|
type="password"
|
|
placeholder={passwordPlaceholder}
|
|
className="text-sm"
|
|
required
|
|
/>
|
|
</div>
|
|
<div className="flex w-full flex-col gap-2">
|
|
<Label>{confirmPasswordLabel}</Label>
|
|
<Input
|
|
type="password"
|
|
placeholder={confirmPasswordPlaceholder}
|
|
className="text-sm"
|
|
required
|
|
/>
|
|
</div>
|
|
<Button type="submit" className="w-full">
|
|
{buttonText}
|
|
</Button>
|
|
</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 { Signup2 };
|