Multi-tenant factory inspection system (SpiFox, Enkid, Alpet): - FastAPI backend with JWT auth, PostgreSQL (asyncpg) - Next.js 16 frontend with App Router, SWR data fetching - Machines CRUD with equipment parts management - Part lifecycle tracking (hours/count/date) with counters - Partial unique index for soft-delete support - 24 pytest tests passing, E2E verified Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
25 lines
703 B
TypeScript
25 lines
703 B
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
interface CardProps {
|
|
icon?: string;
|
|
title?: ReactNode;
|
|
headerRight?: ReactNode;
|
|
children: ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export function Card({ icon, title, headerRight, children, className = '' }: CardProps) {
|
|
return (
|
|
<div className={`card ${className}`}>
|
|
{(icon || title) && (
|
|
<div className="card-header">
|
|
{icon && <span className="material-symbols-outlined">{icon}</span>}
|
|
{title && <span className="card-title">{title}</span>}
|
|
{headerRight && <div style={{ marginLeft: 'auto' }}>{headerRight}</div>}
|
|
</div>
|
|
)}
|
|
<div className="card-body">{children}</div>
|
|
</div>
|
|
);
|
|
}
|