26 lines
724 B
TypeScript
26 lines
724 B
TypeScript
import type { ReactNode } from "react"
|
|
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
|
|
|
interface StatCardProps {
|
|
title: string
|
|
value: string
|
|
description: string
|
|
icon: ReactNode
|
|
}
|
|
|
|
export default function StatCard({ title, value, description, icon }: StatCardProps) {
|
|
return (
|
|
<Card>
|
|
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
|
<CardTitle className="text-sm font-medium text-neutral-600">{title}</CardTitle>
|
|
{icon}
|
|
</CardHeader>
|
|
<CardContent>
|
|
<div className="text-2xl font-bold">{value}</div>
|
|
<CardDescription>{description}</CardDescription>
|
|
</CardContent>
|
|
</Card>
|
|
)
|
|
}
|