mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 10:12:44 +00:00
Restore the desktop badge pressed colour
Main pressed badges to surface0; the field-trigger extraction folded it into the surface2 hover state.
This commit is contained in:
@@ -81,7 +81,9 @@ export function useFieldTriggerStyle(variant: FieldTriggerVariant, disabled: boo
|
||||
(state: PressableStateCallbackType & { hovered?: boolean }) => [
|
||||
variant === "field" ? styles.field : styles.badge,
|
||||
!disabled && Boolean(state.hovered) && styles.highlighted,
|
||||
!disabled && state.pressed && styles.highlighted,
|
||||
!disabled &&
|
||||
state.pressed &&
|
||||
(variant === "field" ? styles.highlighted : styles.badgePressed),
|
||||
disabled && styles.disabled,
|
||||
],
|
||||
[disabled, variant],
|
||||
@@ -161,6 +163,9 @@ const styles = StyleSheet.create((theme) => ({
|
||||
highlighted: {
|
||||
backgroundColor: theme.colors.surface2,
|
||||
},
|
||||
badgePressed: {
|
||||
backgroundColor: theme.colors.surface0,
|
||||
},
|
||||
disabled: {
|
||||
opacity: 0.6,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user