mywork / src /components /admin /StatCard.tsx
DeeCeeXxx's picture
Upload 114 files
e9d5b7d verified
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import type { LucideIcon } from "lucide-react";
interface StatCardProps {
title: string;
value: string | number;
icon: LucideIcon;
description?: string;
}
export function StatCard({ title, value, icon: Icon, description }: StatCardProps) {
return (
<Card className="shadow-md hover:shadow-lg transition-shadow">
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium text-muted-foreground">{title}</CardTitle>
<Icon className="h-5 w-5 text-primary" />
</CardHeader>
<CardContent>
<div className="text-3xl font-bold text-foreground">{value}</div>
{description && <p className="text-xs text-muted-foreground pt-1">{description}</p>}
</CardContent>
</Card>
);
}