add hitslop to repost button (#4469)

zio/stable
Samuel Newman 2024-06-11 00:43:04 +01:00 committed by GitHub
parent 86e81650d3
commit 4e9a65200e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import {View} from 'react-native'
import {msg, plural} from '@lingui/macro' import {msg, plural} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {HITSLOP_10, HITSLOP_20} from '#/lib/constants'
import {useHaptics} from '#/lib/haptics' import {useHaptics} from '#/lib/haptics'
import {useRequireAuth} from '#/state/session' import {useRequireAuth} from '#/state/session'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
@ -64,7 +65,8 @@ let RepostButton = ({
} (${plural(repostCount || 0, {one: '# repost', other: '# reposts'})})`} } (${plural(repostCount || 0, {one: '# repost', other: '# reposts'})})`}
shape="round" shape="round"
variant="ghost" variant="ghost"
color="secondary"> color="secondary"
hitSlop={big ? HITSLOP_20 : HITSLOP_10}>
<Repost style={color} width={big ? 22 : 18} /> <Repost style={color} width={big ? 22 : 18} />
{typeof repostCount !== 'undefined' && repostCount > 0 ? ( {typeof repostCount !== 'undefined' && repostCount > 0 ? (
<Text <Text