Added main dashboard

This commit is contained in:
2025-06-26 13:13:23 +02:00
parent 9f1077e05e
commit b04cefa06f
3 changed files with 101 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
interface StatsCardProps {
title: string
value: number | string
icon?: React.ReactNode
description?: string
}
export function StatsCard({ title, value, icon, description }: StatsCardProps) {
const displayValue = typeof value === "number" ? value.toLocaleString() : value
return (
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">{title}</CardTitle>
{icon}
</CardHeader>
<CardContent>
<div className="text-2xl font-bold">{displayValue}</div>
{description && <p className="text-xs text-muted-foreground">{description}</p>}
</CardContent>
</Card>
)
}