dstpabuaran.com/resources/js/layouts/auth/auth-card-layout.tsx
Yoga Pangestu 23cc327190 Refactor code for improved readability and consistency across multiple files
- Adjusted indentation and formatting in login, permissions, profile, and security pages for better readability.
- Enhanced the clarity of conditional statements and function calls in permissions and profile components.
- Updated type definitions in vite-env.d.ts for better code structure.
- Cleaned up array mapping syntax in ProductTest.php for consistency.
2026-08-01 10:14:47 +07:00

52 lines
1.6 KiB
TypeScript

import { Link } from '@inertiajs/react';
import type { PropsWithChildren } from 'react';
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '@/components/ui/card';
import { home } from '@/routes';
export default function AuthCardLayout({
children,
title,
description,
}: PropsWithChildren<{
name?: string;
title?: string;
description?: string;
}>) {
return (
<div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10">
<div className="flex w-full max-w-md flex-col gap-6">
<Link
href={home()}
className="flex items-center gap-2 self-center font-medium"
>
<div className="flex items-center justify-center">
<img
src="/assets/logo.png"
alt="Logo"
className="size-40"
/>
</div>
</Link>
<div className="flex flex-col gap-6">
<Card className="rounded-xl">
<CardHeader className="px-10 pt-8 pb-0 text-center">
<CardTitle className="text-xl">{title}</CardTitle>
<CardDescription>{description}</CardDescription>
</CardHeader>
<CardContent className="px-10 py-8">
{children}
</CardContent>
</Card>
</div>
</div>
</div>
);
}