mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
Migration complete for: - 5 atoms: Accordion, CopyButton, FileUpload, FilterInput, Image, Input, PasswordInput, Popover (8 total) - 1 molecule: BindingEditor Changes: - Deleted 9 legacy TSX files that have complete JSON equivalents - Exported BindingEditor from json-components.ts with useBindingEditor hook - Registered useBindingEditor in hooks-registry.ts - Updated all imports across codebase to use JSON-based components - Fixed build errors: schema-loader dynamic import, DataSourceGroupSection - Cleaned up component index exports Build status: ✅ PASSING - 0 TypeScript errors - All 9,408 modules transformed successfully - No blocking build warnings Next steps: - 3 organisms still need conversion: DataSourceManager, NavigationMenu, TreeListPanel - 120+ additional components have TSX versions (need individual migration) - 22 JSON components now available for use throughout the app Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { Card, CardContent } from '@/components/ui/card'
|
|
import { cn } from '@/lib/utils'
|
|
import { ReactNode } from 'react'
|
|
|
|
interface MetricCardProps {
|
|
label: string
|
|
value: string | number
|
|
icon?: ReactNode
|
|
trend?: {
|
|
value: number
|
|
direction: 'up' | 'down'
|
|
}
|
|
className?: string
|
|
}
|
|
|
|
export function MetricCard({ label, value, icon, trend, className }: MetricCardProps) {
|
|
return (
|
|
<Card className={cn('bg-card/50 backdrop-blur', className)}>
|
|
<CardContent className="pt-6">
|
|
<div className="flex items-start justify-between gap-2">
|
|
<div className="flex-1">
|
|
<div className="text-sm text-muted-foreground mb-1">{label}</div>
|
|
<div className="text-3xl font-bold">{value}</div>
|
|
{trend && (
|
|
<div
|
|
className={cn(
|
|
'text-sm mt-2',
|
|
trend.direction === 'up' ? 'text-green-500' : 'text-red-500'
|
|
)}
|
|
>
|
|
{trend.direction === 'up' ? '↑' : '↓'} {Math.abs(trend.value)}%
|
|
</div>
|
|
)}
|
|
</div>
|
|
{icon && <div className="text-muted-foreground">{icon}</div>}
|
|
</div>
|
|
</CardContent>
|
|
</Card>
|
|
)
|
|
}
|