AuthSimpleLayout.tsx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { Link } from '@inertiajs/react';
  2. import { type PropsWithChildren } from 'react';
  3. import { AppLogoIcon } from '@/common/AppLogoIcon';
  4. import { home } from '@/routes';
  5. interface AuthLayoutProps {
  6. name?: string;
  7. title?: string;
  8. description?: string;
  9. }
  10. export default function AuthSimpleLayout({ children, title, description }: PropsWithChildren<AuthLayoutProps>) {
  11. return (
  12. <div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-background p-6 md:p-10">
  13. <div className="w-full max-w-sm">
  14. <div className="flex flex-col gap-8">
  15. <div className="flex flex-col items-center gap-4">
  16. <Link href={home()} className="flex flex-col items-center gap-2 font-medium">
  17. <div className="mb-1 flex h-9 w-9 items-center justify-center rounded-md">
  18. <AppLogoIcon className="size-9 fill-current text-[var(--foreground)] dark:text-white" />
  19. </div>
  20. <span className="sr-only">{title}</span>
  21. </Link>
  22. <div className="space-y-2 text-center">
  23. <h1 className="text-xl font-medium">{title}</h1>
  24. <p className="text-center text-sm text-muted-foreground">{description}</p>
  25. </div>
  26. </div>
  27. {children}
  28. </div>
  29. </div>
  30. </div>
  31. );
  32. }