Fix OpButton hover

This commit is contained in:
Joel Jeremy Marquez
2024-07-04 18:51:33 -07:00
parent b1b14d0813
commit 7479df359a

View File

@@ -16,18 +16,20 @@ export function OpButton({ op, selected, style, onClick }: OpButtonProps) {
return (
<Button
variant="bare"
style={{
style={({ isHovered, isPressed }) => ({
backgroundColor: theme.pillBackground,
marginBottom: 5,
...style,
...(selected && {
color: theme.buttonNormalSelectedText,
'&,:hover,:active': {
backgroundColor: theme.buttonNormalSelectedBackground,
color: theme.buttonNormalSelectedText,
},
...(isHovered || isPressed
? {
backgroundColor: theme.buttonNormalSelectedBackground,
color: theme.buttonNormalSelectedText,
}
: {}),
}),
}}
})}
onPress={onClick}
>
{friendlyOp(op)}