From 51df7f57ecbc20a9160cf07379eddcb5e2a0bd55 Mon Sep 17 00:00:00 2001 From: Aleksandar Date: Thu, 11 Dec 2025 13:37:01 +0100 Subject: [PATCH] style: compact stats cards with better colors and layout --- apps/admin/src/components/ui/StatsCard.tsx | 67 ++++++++++------------ 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/apps/admin/src/components/ui/StatsCard.tsx b/apps/admin/src/components/ui/StatsCard.tsx index 2096291..ceb2494 100644 --- a/apps/admin/src/components/ui/StatsCard.tsx +++ b/apps/admin/src/components/ui/StatsCard.tsx @@ -13,68 +13,63 @@ interface StatsCardProps { export function StatsCard({ title, value, change, trend, icon: Icon, color = "blue" }: StatsCardProps) { const colorStyles = { blue: { - bg: "bg-gradient-to-br from-blue-600 to-blue-800", - text: "text-blue-800", - light: "from-blue-100/80 to-blue-150/80", - badge: "bg-blue-200/60 text-blue-900", - icon: "bg-blue-600/30 text-blue-700", + bg: "from-blue-600 to-blue-700", + text: "text-blue-900", + light: "from-blue-50 to-blue-100", + badge: "bg-blue-100 text-blue-700", + icon: "bg-blue-200/70 text-blue-700", }, green: { - bg: "bg-gradient-to-br from-emerald-600 to-emerald-800", - text: "text-emerald-800", - light: "from-emerald-100/80 to-emerald-150/80", - badge: "bg-emerald-200/60 text-emerald-900", - icon: "bg-emerald-600/30 text-emerald-700", + bg: "from-emerald-600 to-emerald-700", + text: "text-emerald-900", + light: "from-emerald-50 to-emerald-100", + badge: "bg-emerald-100 text-emerald-700", + icon: "bg-emerald-200/70 text-emerald-700", }, purple: { - bg: "bg-gradient-to-br from-purple-600 to-purple-800", - text: "text-purple-800", - light: "from-purple-100/80 to-purple-150/80", - badge: "bg-purple-200/60 text-purple-900", - icon: "bg-purple-600/30 text-purple-700", + bg: "from-purple-600 to-purple-700", + text: "text-purple-900", + light: "from-purple-50 to-purple-100", + badge: "bg-purple-100 text-purple-700", + icon: "bg-purple-200/70 text-purple-700", }, orange: { - bg: "bg-gradient-to-br from-orange-600 to-orange-800", - text: "text-orange-800", - light: "from-orange-100/80 to-orange-150/80", - badge: "bg-orange-200/60 text-orange-900", - icon: "bg-orange-600/30 text-orange-700", + bg: "from-orange-600 to-orange-700", + text: "text-orange-900", + light: "from-orange-50 to-orange-100", + badge: "bg-orange-100 text-orange-700", + icon: "bg-orange-200/70 text-orange-700", }, }; const styles = colorStyles[color]; return ( - - - + + + {title} -
- +
+
- -
+ +
{value}
{change && ( -
+
{trend === "up" ? "↑" : trend === "down" ? "↓" : "→"} {change} - vs last month + vs month
)} ); } +}