| 1 | "use client" |
| 2 | |
| 3 | export function StatCard({ |
| 4 | icon: Icon, |
| 5 | label, |
| 6 | value, |
| 7 | sub, |
| 8 | color, |
| 9 | }: { |
| 10 | icon: React |
| 11 | label: string |
| 12 | value: React |
| 13 | sub?: string |
| 14 | color?: string |
| 15 | }) { |
| 16 | return ( |
| 17 | <div className="flex flex-col gap-3 rounded-xl border border-border bg-card p-5 |
| 18 | <div className="flex items-center justify-between |
| 19 | <span className="text-sm font-medium text-muted-foreground |
| 20 | <div |
| 21 | className="flex h-8 w-8 items-center justify-center rounded-lg" |
| 22 | style={{ backgroundColor: |
| 23 | > |
| 24 | <Icon className=" |
| 25 | </div> |
| 26 | </div> |
| 27 | <div className="flex items-baseline gap-2 |
| 28 | <span className="text-3xl font-bold text-foreground |
| 29 | {sub && <span |
| 30 | </div> |
| 31 | </div> |
| 32 | ); |
| 33 | } |