diff --git a/src/pages/AdminRemnawave.tsx b/src/pages/AdminRemnawave.tsx index 3c7c592..4658771 100644 --- a/src/pages/AdminRemnawave.tsx +++ b/src/pages/AdminRemnawave.tsx @@ -116,24 +116,33 @@ interface StatCardProps { subValue?: string; } +// Soulful chip + matching value colour, in the spirit of the sales-stats cards. +// Fixed-size chip + forced icon size normalises every icon regardless of what the +// call site passes (some omit a className) — that was the source of the misalignment. +const STAT_TONE: Record = { + accent: { chip: 'bg-accent-500/15 text-accent-400', value: 'text-accent-400' }, + green: { chip: 'bg-success-500/15 text-success-400', value: 'text-success-400' }, + blue: { chip: 'bg-accent-500/15 text-accent-400', value: 'text-accent-400' }, + orange: { chip: 'bg-warning-500/15 text-warning-400', value: 'text-warning-400' }, + red: { chip: 'bg-error-500/15 text-error-400', value: 'text-error-400' }, + purple: { chip: 'bg-accent-500/15 text-accent-400', value: 'text-accent-400' }, +}; + function StatCard({ label, value, icon, color = 'accent', subValue }: StatCardProps) { - const colorClasses: Record = { - accent: 'bg-accent-500/20 text-accent-400', - green: 'bg-success-500/20 text-success-400', - blue: 'bg-accent-500/20 text-accent-400', - orange: 'bg-warning-500/20 text-warning-400', - red: 'bg-error-500/20 text-error-400', - purple: 'bg-accent-500/20 text-accent-400', - }; + const tone = STAT_TONE[color] ?? STAT_TONE.accent; return (
-
-
{icon}
+

{label}

+
+ svg]:h-5 [&>svg]:w-5 ${tone.chip}`} + > + {icon} +
-

{label}

-

{value}

- {subValue &&

{subValue}

} +
{value}
+ {subValue &&
{subValue}
}