diff --git a/src/view/com/util/forms/Button.tsx b/src/view/com/util/forms/Button.tsx index a8f1f363..6a5f19f9 100644 --- a/src/view/com/util/forms/Button.tsx +++ b/src/view/com/util/forms/Button.tsx @@ -128,6 +128,7 @@ export function Button({ }, }, ) + const onPressWrapped = React.useCallback( (event: Event) => { event.stopPropagation() @@ -136,9 +137,23 @@ export function Button({ }, [onPress], ) + + const getStyle = React.useCallback( + state => { + const arr = [typeOuterStyle, styles.outer, style] + if (state.pressed) { + arr.push({opacity: 0.6}) + } else if (state.hovered) { + arr.push({opacity: 0.8}) + } + return arr + }, + [typeOuterStyle, style], + ) + return ( { store.shell.setDarkMode(!store.shell.darkMode) @@ -72,12 +72,11 @@ export const DesktopRightNav = observer(function DesktopRightNav() { : 'Sets display to dark mode' }> - { - mode === 'Dark' ? + {mode === 'Dark' ? ( - : + ) : ( - } + )} {otherMode} mode