@@ -14,7 +14,9 @@ import color from 'color';
14
14
import { useInternalTheme } from '../../core/theming' ;
15
15
import type { ThemeProp } from '../../types' ;
16
16
import Icon , { IconSource } from '../Icon' ;
17
- import TouchableRipple from '../TouchableRipple/TouchableRipple' ;
17
+ import TouchableRipple , {
18
+ Props as TouchableRippleProps ,
19
+ } from '../TouchableRipple/TouchableRipple' ;
18
20
import Text from '../Typography/Text' ;
19
21
20
22
export type Props = React . ComponentPropsWithRef < typeof View > & {
@@ -59,6 +61,10 @@ export type Props = React.ComponentPropsWithRef<typeof View> & {
59
61
* Color of the ripple effect.
60
62
*/
61
63
rippleColor ?: ColorValue ;
64
+ /**
65
+ * Sets additional distance outside of element in which a press can be detected.
66
+ */
67
+ hitSlop ?: TouchableRippleProps [ 'hitSlop' ] ;
62
68
style ?: StyleProp < ViewStyle > ;
63
69
/**
64
70
* @optional
@@ -98,6 +104,7 @@ const DrawerItem = ({
98
104
accessibilityLabel,
99
105
right,
100
106
labelMaxFontSizeMultiplier,
107
+ hitSlop,
101
108
...rest
102
109
} : Props ) => {
103
110
const theme = useInternalTheme ( themeOverrides ) ;
@@ -141,6 +148,7 @@ const DrawerItem = ({
141
148
accessibilityLabel = { accessibilityLabel }
142
149
rippleColor = { customRippleColor || rippleColor }
143
150
theme = { theme }
151
+ hitSlop = { hitSlop }
144
152
>
145
153
< View style = { [ styles . wrapper , isV3 && styles . v3Wrapper ] } >
146
154
< View style = { styles . content } >
0 commit comments