`.
@@ -29,7 +32,7 @@ interface StatCardProps {
export default function StatCard({ label, value, icon, loading = false, onClick, active = false, id }: StatCardProps) {
const interactive = !!onClick;
- const baseClasses = "flex w-full items-center justify-between rounded-xl border p-5 backdrop-blur-xl transition-all duration-300";
+ const baseClasses = "flex w-full flex-col items-center gap-2 rounded-xl border p-4 backdrop-blur-xl transition-all duration-300 sm:flex-row sm:items-center sm:justify-between sm:gap-3 sm:p-5";
const stateClasses = active
? "border-accent/50 bg-accent/10"
: "border-border bg-frosted-glass hover:border-accent/30";
@@ -39,20 +42,20 @@ export default function StatCard({ label, value, icon, loading = false, onClick,
const className = `${baseClasses} ${stateClasses} ${interactiveClasses}`;
const content = loading ? (
-
+
) : (
<>
-
-
- {label}
+
+
+ {label}
-
+
{value.toLocaleString()}
>