Added main dashboard
This commit is contained in:
25
src/components/dashboard/stats-card.tsx
Normal file
25
src/components/dashboard/stats-card.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user