add hitslop to repost button (#4469)
This commit is contained in:
		
							parent
							
								
									86e81650d3
								
							
						
					
					
						commit
						4e9a65200e
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue