Refine event status filter styling
This commit is contained in:
@@ -313,36 +313,56 @@ function EventsList({
|
||||
</Text>
|
||||
</XStack>
|
||||
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
|
||||
<ToggleGroup
|
||||
type="single"
|
||||
value={statusFilter}
|
||||
onValueChange={(value) => value && onStatusChange(value as EventStatusKey)}
|
||||
<XStack
|
||||
alignItems="center"
|
||||
padding="$1"
|
||||
borderRadius={999}
|
||||
borderWidth={1}
|
||||
borderColor={border}
|
||||
backgroundColor={surfaceMuted}
|
||||
>
|
||||
<XStack space="$2" paddingVertical="$1">
|
||||
{filters.map((filter) => {
|
||||
const active = filter.key === statusFilter;
|
||||
return (
|
||||
<ToggleGroup.Item
|
||||
key={filter.key}
|
||||
value={filter.key}
|
||||
borderRadius={999}
|
||||
borderWidth={1}
|
||||
borderColor={active ? activeBorder : border}
|
||||
backgroundColor={active ? activeBg : surface}
|
||||
paddingVertical="$2"
|
||||
paddingHorizontal="$3"
|
||||
>
|
||||
<XStack alignItems="center" space="$1.5">
|
||||
<Text fontSize="$xs" fontWeight="700" color={active ? primary : muted}>
|
||||
{filter.label}
|
||||
</Text>
|
||||
<PillBadge tone={active ? 'success' : 'muted'}>{filter.count}</PillBadge>
|
||||
</XStack>
|
||||
</ToggleGroup.Item>
|
||||
);
|
||||
})}
|
||||
</XStack>
|
||||
</ToggleGroup>
|
||||
<ToggleGroup
|
||||
type="single"
|
||||
value={statusFilter}
|
||||
onValueChange={(value) => value && onStatusChange(value as EventStatusKey)}
|
||||
>
|
||||
<XStack space="$1.5">
|
||||
{filters.map((filter) => {
|
||||
const active = filter.key === statusFilter;
|
||||
return (
|
||||
<ToggleGroup.Item
|
||||
key={filter.key}
|
||||
value={filter.key}
|
||||
borderRadius={999}
|
||||
borderWidth={1}
|
||||
borderColor={active ? activeBorder : 'transparent'}
|
||||
backgroundColor={active ? activeBg : 'transparent'}
|
||||
paddingVertical="$1.5"
|
||||
paddingHorizontal="$3"
|
||||
>
|
||||
<XStack alignItems="center" space="$1.5">
|
||||
<Text fontSize="$xs" fontWeight="700" color={active ? primary : muted}>
|
||||
{filter.label}
|
||||
</Text>
|
||||
<XStack
|
||||
paddingHorizontal="$1.5"
|
||||
paddingVertical="$0.5"
|
||||
borderRadius={999}
|
||||
borderWidth={1}
|
||||
borderColor={active ? activeBorder : border}
|
||||
backgroundColor={surface}
|
||||
>
|
||||
<Text fontSize={10} fontWeight="800" color={active ? primary : muted}>
|
||||
{filter.count}
|
||||
</Text>
|
||||
</XStack>
|
||||
</XStack>
|
||||
</ToggleGroup.Item>
|
||||
);
|
||||
})}
|
||||
</XStack>
|
||||
</ToggleGroup>
|
||||
</XStack>
|
||||
</ScrollView>
|
||||
</YStack>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user