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 = "bg-blue-500" }) => { return (

{title}

{value}
{/* Note: In Tailwind bg-opacity works if colorClass is like 'bg-blue-500'. Here we assume the consumer passes specific utility classes or we construct them. Simpler approach: Use a wrapper */}
{(trend || subValue) && (
{trend === 'up' && ▲ {trendValue}} {trend === 'down' && ▼ {trendValue}} {subValue && {subValue}}
)}
); };