Improve active states for admin tabs and filters
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-04 08:44:50 +01:00
parent eecb1a5b85
commit 93ae23fd0a
7 changed files with 178 additions and 91 deletions

View File

@@ -319,40 +319,34 @@ function EventsList({
orientation="horizontal"
flexDirection="row"
alignItems="center"
padding="$1"
gap="$1.5"
borderRadius="$pill"
borderWidth={1}
borderColor={border}
backgroundColor={surfaceMuted}
gap="$2"
>
{filters.map((filter) => (
<ToggleGroup.Item
key={filter.key}
value={filter.key}
borderRadius="$pill"
paddingVertical="$1.5"
paddingHorizontal="$3"
>
<XStack alignItems="center" gap="$1.5">
<Text fontSize="$xs" fontWeight="600">
{filter.label}
</Text>
<XStack
paddingHorizontal="$1.5"
paddingVertical="$0.5"
borderRadius="$pill"
borderWidth={1}
borderColor={border}
backgroundColor="$backgroundStrong"
>
<Text fontSize={10} fontWeight="700">
{filters.map((filter) => {
const active = filter.key === statusFilter;
return (
<ToggleGroup.Item
key={filter.key}
value={filter.key}
borderRadius="$4"
borderWidth={1}
borderColor={border}
paddingVertical="$2"
paddingHorizontal="$3"
hoverStyle={{ backgroundColor: '$backgroundHover' }}
pressStyle={{ backgroundColor: '$backgroundPress' }}
activeStyle={{ backgroundColor: '$backgroundPress', borderColor: '$borderColorPress' }}
>
<XStack alignItems="center" gap="$2">
<Text fontSize="$xs" fontWeight={active ? '700' : '600'} color={active ? text : muted}>
{filter.label}
</Text>
<Text fontSize={10} fontWeight="700" color={active ? text : muted}>
{filter.count}
</Text>
</XStack>
</XStack>
</ToggleGroup.Item>
))}
</ToggleGroup.Item>
);
})}
</ToggleGroup>
</ScrollView>
</YStack>