18 lines
489 B
TypeScript
18 lines
489 B
TypeScript
|
|
import React from 'react';
|
||
|
|
|
||
|
|
interface MetricCardProps {
|
||
|
|
label: string;
|
||
|
|
value: string | number;
|
||
|
|
className?: string;
|
||
|
|
valueColor?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function MetricCard({ label, value, className = '', valueColor = 'text-primary-400' }: MetricCardProps) {
|
||
|
|
return (
|
||
|
|
<div className={`bg-dark-500 rounded-lg p-4 ${className}`}>
|
||
|
|
<div className="text-sm text-dark-200 mb-1">{label}</div>
|
||
|
|
<div className={`text-2xl font-bold ${valueColor}`}>{value}</div>
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|