G1 — Design System: 14 UI primitives (Button, Card, Modal, Sheet, Input, Textarea, Select, EmptyState, LoadingShimmer, ConfirmDialog, WashiTape, Badge, Avatar, Tabs), PageTransition with Framer Motion, sun/moon CSS vars, Caveat font, /dev/components visual showcase. G2 — Memories Pipeline: R2 presigned uploads, Sharp thumbnail generation, LiteLLM vision captions + pgvector embeddings, CSS masonry gallery with infinite scroll, private toggle, semantic search fallback to ILIKE. G3 — Medical: dose log + correction audit trail, IAP vaccine bulk import, emergency escalation page, pediatrician phone in settings. G4 — AI Brain: keyword guardrail → LLM classifier → structured DB tool-use (7 tools) → memory search → general parenting handler; ai_usage table; 22-case medical bypass safety test suite. DB migrations: 0011_memories, 0012_medical_doses, 0013_ai_usage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
748 B
TypeScript
24 lines
748 B
TypeScript
import { ReactNode } from "react";
|
|
|
|
interface EmptyStateProps {
|
|
icon?: string | ReactNode;
|
|
title: string;
|
|
description?: string;
|
|
action?: ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export function EmptyState({ icon, title, description, action, className = "" }: EmptyStateProps) {
|
|
return (
|
|
<div className={`flex flex-col items-center justify-center text-center gap-3 py-12 ${className}`}>
|
|
{icon && (
|
|
<div className="text-4xl mb-1">{icon}</div>
|
|
)}
|
|
<p className="font-medium text-gray-700 dark:text-gray-200">{title}</p>
|
|
{description && (
|
|
<p className="text-sm text-gray-400 dark:text-gray-500 max-w-xs">{description}</p>
|
|
)}
|
|
{action && <div className="mt-2">{action}</div>}
|
|
</div>
|
|
);
|
|
}
|