92 lines
2.5 KiB
TypeScript
92 lines
2.5 KiB
TypeScript
import { Button } from "@/components/ui/button";
|
|||
|
|
import { Input } from "@/components/ui/input";
|
||
|
|
import { cn } from "@/lib/utils";
|
||
|
|
|
||
|
|
interface Login1Props {
|
||
|
|
heading?: string;
|
||
|
|
logo: {
|
||
|
|
url: string;
|
||
|
|
src: string;
|
||
|
|
alt: string;
|
||
|
|
title?: string;
|
||
|
|
className?: string;
|
||
|
|
};
|
||
|
|
buttonText?: string;
|
||
|
|
emailPlaceholder?: string;
|
||
|
|
passwordPlaceholder?: string;
|
||
|
|
googleText?: string;
|
||
|
|
signupText?: string;
|
||
|
|
signupLinkText?: string;
|
||
|
|
signupUrl?: string;
|
||
|
|
className?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
const Login1 = ({
|
||
|
|
heading = "ورود",
|
||
|
|
logo = {
|
||
|
|
url: "https://www.ShadcnBlocks",
|
||
|
|
src: "/block-media/shadcnblocks/block/logos/ShadcnBlockscom-wordmark.svg",
|
||
|
|
alt: "لوگو",
|
||
|
|
title: "نام برند",
|
||
|
|
},
|
||
|
|
buttonText = "ورود",
|
||
|
|
emailPlaceholder = "ایمیل",
|
||
|
|
passwordPlaceholder = "رمز عبور",
|
||
|
|
signupText = "حساب کاربری ندارید؟",
|
||
|
|
signupLinkText = "ثبتنام",
|
||
|
|
signupUrl = "/#",
|
||
|
|
className,
|
||
|
|
}: Login1Props) => {
|
||
|
|
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 text-start shadow-md">
|
||
|
|
{heading && <h1 className="w-full text-xl font-semibold">{heading}</h1>}
|
||
|
|
<Input
|
||
|
|
type="email"
|
||
|
|
placeholder={emailPlaceholder}
|
||
|
|
className="text-start text-sm"
|
||
|
|
dir="rtl"
|
||
|
|
required
|
||
|
|
/>
|
||
|
|
<Input
|
||
|
|
type="password"
|
||
|
|
placeholder={passwordPlaceholder}
|
||
|
|
className="text-start text-sm"
|
||
|
|
dir="rtl"
|
||
|
|
required
|
||
|
|
/>
|
||
|
|
<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"
|
||
|
|
>
|
||
|
|
{signupLinkText}
|
||
|
|
</a>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
);
|
||
|
|
};
|
||
|
|
|
||
|
|
export { Login1 };
|