2025-09-18 14:52:26 +09:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import Link from "next/link";
|
|
|
|
|
import { ArrowLeftIcon } from "@heroicons/react/24/outline";
|
2025-09-27 17:51:54 +09:00
|
|
|
import { Logo } from "@/components/atoms/logo";
|
2025-09-18 14:52:26 +09:00
|
|
|
|
2025-09-20 11:35:40 +09:00
|
|
|
export interface AuthLayoutProps {
|
2025-09-18 14:52:26 +09:00
|
|
|
children: React.ReactNode;
|
|
|
|
|
title: string;
|
|
|
|
|
subtitle?: string;
|
|
|
|
|
showBackButton?: boolean;
|
|
|
|
|
backHref?: string;
|
|
|
|
|
backLabel?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function AuthLayout({
|
|
|
|
|
children,
|
|
|
|
|
title,
|
|
|
|
|
subtitle,
|
|
|
|
|
showBackButton = false,
|
|
|
|
|
backHref = "/",
|
|
|
|
|
backLabel = "Back to Home",
|
|
|
|
|
}: AuthLayoutProps) {
|
|
|
|
|
return (
|
2025-12-16 13:54:31 +09:00
|
|
|
<div className="w-full flex flex-col items-center py-[var(--cp-space-3xl)]">
|
|
|
|
|
<div className="w-full max-w-md">
|
2025-09-18 14:52:26 +09:00
|
|
|
{showBackButton && (
|
|
|
|
|
<div className="mb-6">
|
|
|
|
|
<Link
|
|
|
|
|
href={backHref}
|
2025-12-16 13:54:31 +09:00
|
|
|
className="inline-flex items-center text-sm font-medium text-muted-foreground hover:text-foreground transition-colors"
|
2025-09-18 14:52:26 +09:00
|
|
|
>
|
|
|
|
|
<ArrowLeftIcon className="h-4 w-4 mr-2" />
|
|
|
|
|
{backLabel}
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<div className="text-center">
|
2025-09-27 17:51:54 +09:00
|
|
|
<div className="flex justify-center mb-8">
|
2025-12-16 13:54:31 +09:00
|
|
|
<Logo size={72} className="text-primary" />
|
2025-09-27 17:51:54 +09:00
|
|
|
</div>
|
2025-12-16 13:54:31 +09:00
|
|
|
<h1 className="text-2xl sm:text-3xl font-bold tracking-tight text-foreground mb-3">
|
|
|
|
|
{title}
|
|
|
|
|
</h1>
|
|
|
|
|
{subtitle && (
|
|
|
|
|
<p className="text-base text-muted-foreground leading-relaxed">{subtitle}</p>
|
|
|
|
|
)}
|
2025-09-18 14:52:26 +09:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-12-16 13:54:31 +09:00
|
|
|
<div className="mt-8 w-full max-w-md">
|
|
|
|
|
<div className="bg-card text-card-foreground py-10 px-6 rounded-3xl border border-border shadow-[var(--cp-card-shadow-lg)] sm:px-12">
|
2025-09-18 14:52:26 +09:00
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|