Skip to content

Commit 500025c

Browse files
authored
Add createNativeWrapper() & NativeViewGH docs (#1569)
1 parent d6b6d6a commit 500025c

File tree

4 files changed

+46
-103
lines changed

4 files changed

+46
-103
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
id: create-native-wrapper
3+
title: createNativeWrapper
4+
sidebar_label: createNativeWrapper()
5+
---
6+
7+
Creates provided component with NativeViewGestureHandler, allowing it to be part of RNGH's
8+
gesture system.
9+
10+
## Arguments
11+
12+
### Component
13+
14+
The component we want to wrap.
15+
16+
### config
17+
18+
Config is an object with properties that can be used on [`NativeViewGestureHandler`](nativeview-gh.md)
19+
20+
## Returns
21+
22+
Wrapped component.

docs/docs/api/gesture-handlers/handlers-unused.md

Lines changed: 0 additions & 103 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
id: nativeview-gh
3+
title: NativeViewGestureHandler
4+
sidebar_label: NativeView
5+
---
6+
7+
A gesture handler that allows other touch handling components to participate in
8+
RNGH's gesture system.
9+
10+
Used by [`createNativeWrapper()`](create-native-wrapper.md).
11+
12+
## Properties
13+
14+
See [set of properties inherited from base handler class](common-gh.md#properties). Below is a list of properties specific to `NativeViewGestureHandler` component:
15+
16+
### `shouldActivateOnStart` (**Android only**)
17+
18+
When `true`, underlying handler will activate unconditionally when in `BEGAN` or `UNDETERMINED` state.
19+
20+
### `disallowInterruption`
21+
22+
When `true`, cancels all other gesture handlers when this `NativeViewGestureHandler` receives an `ACTIVE` state event.

docs/sidebars.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ module.exports = {
1818
'api/gesture-handlers/fling-gh',
1919
'api/gesture-handlers/pinch-gh',
2020
'api/gesture-handlers/force-gh',
21+
'api/gesture-handlers/nativeview-gh',
22+
'api/gesture-handlers/create-native-wrapper'
2123
],
2224
Components: [
2325
'api/components/buttons',

0 commit comments

Comments
 (0)