mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
[change] Remove hitSlop
Rely on the native behavior of browsers to provide hitslop for touch on interactive elements. Fix 1609
This commit is contained in:
@@ -23,7 +23,6 @@ Please also refer to the in-depth "Accessibility" and "Style" guides.
|
||||
| accessibilityValue | ?Object | |
|
||||
| accessible | ?boolean | |
|
||||
| children | ?any | |
|
||||
| hitSlop | ?Object | |
|
||||
| importantForAccessibility | ?string | |
|
||||
| nativeID | ?string | |
|
||||
| onBlur | ?Function | |
|
||||
@@ -49,19 +48,6 @@ Please also refer to the in-depth "Accessibility" and "Style" guides.
|
||||
| style | ?Style | |
|
||||
| testID | ?string | |
|
||||
|
||||
### hitSlop
|
||||
|
||||
This defines how far a touch event can start away from the view (in pixels).
|
||||
Typical interface guidelines recommend touch targets that are at least 30 - 40
|
||||
points/density-independent pixels.
|
||||
|
||||
For example, if a touchable view has a height of 20 the touchable height can be
|
||||
extended to 40 with hitSlop.
|
||||
|
||||
```js
|
||||
<View hitSlop={{top: 10, bottom: 10, left: 0, right: 0}} />
|
||||
```
|
||||
|
||||
### onLayout
|
||||
|
||||
This is invoked when a component is mounted and when its layout changes. `x` and
|
||||
|
||||
Reference in New Issue
Block a user