29 lines
908 B
TypeScript
29 lines
908 B
TypeScript
import type { CSSProperties, ReactNode } from "react";
|
|
|
|
export type InfoStatCardProps = {
|
|
icon: ReactNode;
|
|
label: string;
|
|
value: ReactNode;
|
|
className?: string;
|
|
style?: CSSProperties;
|
|
};
|
|
|
|
export function InfoStatCard({ icon, label, value, className = "", style }: InfoStatCardProps) {
|
|
return (
|
|
<div
|
|
className={`rounded-2xl bg-white border border-neutral-20 shadow-sm p-5 animate-fade-in-up ${className}`.trim()}
|
|
style={style}
|
|
>
|
|
<div className="flex items-start gap-3">
|
|
<div className="shrink-0 w-8 h-8 rounded-lg bg-neutral-10 flex items-center justify-center text-neutral-60">
|
|
{icon}
|
|
</div>
|
|
<div className="min-w-0">
|
|
<p className="label-12 text-neutral-60 uppercase tracking-wide break-keep">{label}</p>
|
|
<p className="title-18 text-navy-900 mt-1 break-keep">{value}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|