import React from 'react'; import { LucideIcon } from 'lucide-react'; interface KPICardProps { title: string; value: string | number; subValue?: string; trend?: 'up' | 'down' | 'neutral'; trendValue?: string; icon: LucideIcon; colorClass?: string; } export const KPICard: React.FC = ({ title, value, subValue, trend, trendValue, icon: Icon, colorClass = "text-blue-600" }) => { // Extract base color from colorClass (e.g., 'text-yellow-600' -> 'yellow') const baseColor = colorClass.split('-')[1] || 'blue'; return (

{title}

{value}
{(trend || subValue) && (
{trend === 'up' && ▲ {trendValue}} {trend === 'down' && ▼ {trendValue}} {subValue && {subValue}}
)}
); };