@@ -14,7 +14,9 @@ import color from 'color';
1414import { useInternalTheme } from '../../core/theming' ;
1515import type { ThemeProp } from '../../types' ;
1616import Icon , { IconSource } from '../Icon' ;
17- import TouchableRipple from '../TouchableRipple/TouchableRipple' ;
17+ import TouchableRipple , {
18+ Props as TouchableRippleProps ,
19+ } from '../TouchableRipple/TouchableRipple' ;
1820import Text from '../Typography/Text' ;
1921
2022export type Props = React . ComponentPropsWithRef < typeof View > & {
@@ -59,6 +61,10 @@ export type Props = React.ComponentPropsWithRef<typeof View> & {
5961 * Color of the ripple effect.
6062 */
6163 rippleColor ?: ColorValue ;
64+ /**
65+ * Sets additional distance outside of element in which a press can be detected.
66+ */
67+ hitSlop ?: TouchableRippleProps [ 'hitSlop' ] ;
6268 style ?: StyleProp < ViewStyle > ;
6369 /**
6470 * @optional
@@ -98,6 +104,7 @@ const DrawerItem = ({
98104 accessibilityLabel,
99105 right,
100106 labelMaxFontSizeMultiplier,
107+ hitSlop,
101108 ...rest
102109} : Props ) => {
103110 const theme = useInternalTheme ( themeOverrides ) ;
@@ -141,6 +148,7 @@ const DrawerItem = ({
141148 accessibilityLabel = { accessibilityLabel }
142149 rippleColor = { customRippleColor || rippleColor }
143150 theme = { theme }
151+ hitSlop = { hitSlop }
144152 >
145153 < View style = { [ styles . wrapper , isV3 && styles . v3Wrapper ] } >
146154 < View style = { styles . content } >
0 commit comments