d89304845a
- Backend: FastAPI, JWT auth (HS256), bcrypt, RBAC middleware - User CRUD (admin-only), soft-delete, pagination - Pydantic BaseSettings config, async SQLAlchemy 2.0 - 50 backend tests, 88% coverage - Frontend: Next.js 14 App Router, Tailwind, design tokens - Login page, auth context, API client with auto-refresh - i18n: next-intl, DE/EN (31 keys each) - 6 base UI components (Button, Input, Card, Table, Modal, Toast) - 12 frontend tests, npm build success
19 lines
489 B
TypeScript
19 lines
489 B
TypeScript
import { HTMLAttributes, ReactNode } from 'react';
|
|
|
|
interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
title?: string;
|
|
children: ReactNode;
|
|
}
|
|
|
|
export function Card({ title, children, className = '', ...props }: CardProps) {
|
|
return (
|
|
<div
|
|
className={`bg-surface rounded-xl shadow-sm border border-border p-6 ${className}`}
|
|
{...props}
|
|
>
|
|
{title && <h2 className="text-xl font-semibold text-text mb-4">{title}</h2>}
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|