{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "entity-card", "title": "Entity Card", "description": "Card displaying a ContentGrid entity with item count and create action.", "dependencies": ["lucide-react"], "registryDependencies": ["button", "card"], "files": [ { "path": "src/patterns/entity-card/entity-card.tsx", "content": "import { Database, FileText, Plus } from \"lucide-react\";\nimport { Button } from \"../../primitives/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"../../primitives/card\";\n\nexport interface EntityCardProps {\n /** Unique identifier / URL-safe name for this entity (used in callback) */\n name: string;\n /** Human-readable title */\n title: string;\n /** Total item count; shown as \"—\" when undefined */\n count?: number;\n /** Optional description shown below the title */\n description?: string;\n /** When true a FileText icon is shown, otherwise a Database icon */\n hasContent?: boolean;\n /** Called when the user clicks the create-action button */\n onCreateClick?: (entityName: string) => void;\n /** Called when the user clicks the card title / entity link */\n onTitleClick?: (entityName: string) => void;\n}\n\nexport function EntityCard({\n name,\n title,\n count,\n description,\n hasContent,\n onCreateClick,\n onTitleClick,\n}: Readonly) {\n return (\n \n \n
\n \n onTitleClick?.(name)}\n >\n {hasContent ? (\n \n ) : (\n \n )}\n {title}\n \n \n {description && (\n

{description}

\n )}\n
\n
\n {\n e.stopPropagation();\n onCreateClick?.(name);\n }}\n >\n \n Create {title}\n \n
\n
\n \n
{count ?? \"—\"}
\n

items

\n
\n
\n );\n}\n", "type": "registry:ui" }, { "path": "src/patterns/entity-card/index.ts", "content": "export { EntityCard } from \"./entity-card\";\nexport type { EntityCardProps } from \"./entity-card\";\n", "type": "registry:ui" } ], "type": "registry:ui" }