fix(theming): alertes archivées buttons

This commit is contained in:
Jo 2025-08-09 10:57:31 +02:00
parent d5ad23d1da
commit d6a3e94ea7
Signed by: devthejo
GPG key ID: 00CCA7A92B1D5351

View file

@ -69,7 +69,10 @@ export default withConnectivity(function AlertAggListArchived() {
value={sortBy} value={sortBy}
> >
<ToggleButton <ToggleButton
style={styles.sortByButton} style={[
styles.sortByButton,
sortBy === "createdAt" && styles.sortByButtonSelected,
]}
icon={() => ( icon={() => (
// <MaterialIcons // <MaterialIcons
// name="access-time" // name="access-time"
@ -79,18 +82,29 @@ export default withConnectivity(function AlertAggListArchived() {
<MaterialCommunityIcons <MaterialCommunityIcons
name="clock-time-four-outline" name="clock-time-four-outline"
size={20} size={20}
color={colors.surfaceSecondary} color={
sortBy === "createdAt"
? colors.onPrimary
: colors.onSurfaceVariant
}
/> />
)} )}
value="createdAt" value="createdAt"
/> />
<ToggleButton <ToggleButton
style={styles.sortByButton} style={[
styles.sortByButton,
sortBy === "alphabetical" && styles.sortByButtonSelected,
]}
icon={() => ( icon={() => (
<MaterialCommunityIcons <MaterialCommunityIcons
name="alphabetical" name="alphabetical"
size={20} size={20}
color={colors.surfaceSecondary} color={
sortBy === "alphabetical"
? colors.onPrimary
: colors.onSurfaceVariant
}
/> />
)} )}
value="alphabetical" value="alphabetical"
@ -156,6 +170,12 @@ const useStyles = createStyles(({ wp, hp, scaleText, theme: { colors } }) => ({
sortByButton: { sortByButton: {
height: 32, height: 32,
width: 32, width: 32,
alignItems: "center",
justifyContent: "center",
borderRadius: 6,
},
sortByButtonSelected: {
backgroundColor: colors.primary,
}, },
title: { title: {
fontSize: 13, fontSize: 13,