Reduce bottom hitslop for menu button (#11189)

(cherry picked from commit a49faf46eb)
This commit is contained in:
DS Boyce
2026-07-20 05:39:25 -07:00
committed by Eric Bailey
parent f9384e44c7
commit 5d542b8ba7
+4 -3
View File
@@ -4,7 +4,6 @@ import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {useNavigation} from '@react-navigation/native' import {useNavigation} from '@react-navigation/native'
import {HITSLOP_30} from '#/lib/constants'
import {type NavigationProp} from '#/lib/routes/types' import {type NavigationProp} from '#/lib/routes/types'
import {useSetDrawerOpen} from '#/state/shell' import {useSetDrawerOpen} from '#/state/shell'
import {useIsWithinSplitView} from '#/screens/Messages/components/splitView/context' import {useIsWithinSplitView} from '#/screens/Messages/components/splitView/context'
@@ -33,6 +32,8 @@ import {Text} from '#/components/Typography'
import {useAnalytics} from '#/analytics' import {useAnalytics} from '#/analytics'
import {IS_IOS} from '#/env' import {IS_IOS} from '#/env'
const HEADER_BUTTON_HITSLOP = {top: 30, bottom: 10, left: 30, right: 30}
export function Outer({ export function Outer({
children, children,
noBottomBorder, noBottomBorder,
@@ -136,7 +137,7 @@ export function BackButton({onPress, style, ...props}: Partial<ButtonProps>) {
color="secondary" color="secondary"
shape="round" shape="round"
onPress={onPressBack} onPress={onPressBack}
hitSlop={HITSLOP_30} hitSlop={HEADER_BUTTON_HITSLOP}
style={[ style={[
{marginLeft: -BUTTON_VISUAL_ALIGNMENT_OFFSET}, {marginLeft: -BUTTON_VISUAL_ALIGNMENT_OFFSET},
a.bg_transparent, a.bg_transparent,
@@ -170,7 +171,7 @@ export function MenuButton() {
color="secondary" color="secondary"
shape="square" shape="square"
onPress={onPress} onPress={onPress}
hitSlop={HITSLOP_30} hitSlop={HEADER_BUTTON_HITSLOP}
style={[ style={[
{marginLeft: -BUTTON_VISUAL_ALIGNMENT_OFFSET}, {marginLeft: -BUTTON_VISUAL_ALIGNMENT_OFFSET},
a.bg_transparent, a.bg_transparent,