From 8ac38cf26454b1903b3536a325ab93a065711e45 Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Thu, 22 Jan 2026 17:01:54 +0100 Subject: [PATCH] Adjust KPI strip layout --- resources/js/admin/mobile/DashboardPage.tsx | 2 +- .../js/admin/mobile/components/Primitives.tsx | 99 ++++++++++--------- 2 files changed, 56 insertions(+), 45 deletions(-) diff --git a/resources/js/admin/mobile/DashboardPage.tsx b/resources/js/admin/mobile/DashboardPage.tsx index 933e923..9378b01 100644 --- a/resources/js/admin/mobile/DashboardPage.tsx +++ b/resources/js/admin/mobile/DashboardPage.tsx @@ -467,7 +467,7 @@ function PulseStrip({ event, stats }: any) { icon: Users, value: guestCount, label: t('management:events.list.stats.guests', 'Guests'), - color: theme.textStrong, + tone: 'neutral', }, { icon: ShieldCheck, diff --git a/resources/js/admin/mobile/components/Primitives.tsx b/resources/js/admin/mobile/components/Primitives.tsx index 185dbf5..79bb816 100644 --- a/resources/js/admin/mobile/components/Primitives.tsx +++ b/resources/js/admin/mobile/components/Primitives.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { Card } from '@tamagui/card'; import { YStack, XStack } from '@tamagui/stacks'; import { SizableText as Text } from '@tamagui/text'; import { Pressable } from '@tamagui/react-native-web-lite'; @@ -206,64 +207,74 @@ export function KpiStrip({ value: string | number; color?: string; note?: string; + tone?: 'accent' | 'neutral'; }> }) { - const { glassSurface, border, textStrong, textMuted, primary } = useAdminTheme(); + const { glassSurface, border, textStrong, textMuted, primary, surfaceMuted, surface } = useAdminTheme(); return ( - - - {items.map((item, index) => { - const isLast = index === items.length - 1; - const iconColor = item.color || primary; - const iconBg = withAlpha(iconColor, 0.12); + + {items.map((item, index) => { + const isNeutral = item.tone === 'neutral'; + const iconColor = isNeutral ? textStrong : item.color || primary; + const iconBg = isNeutral ? surfaceMuted : withAlpha(iconColor, 0.12); - return ( - - + return ( + + + + {item.value} + + + - - - - {item.value} + + {item.label} + + {item.note ? ( + + {item.note} - - {item.label} - - - - {item.note && ( - - {item.note} - - )} + ) : null} - - {!isLast && ( - - )} - - ); - })} - - + + + ); + })} + ); } @@ -462,4 +473,4 @@ export function ContentTabs({ ))} ); -} \ No newline at end of file +}