Skip to content

Commit

Permalink
fix(📖): gesture docs (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
felippepuhle authored and wcandillon committed Dec 30, 2019
1 parent 46c9a13 commit f1a9e68
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,59 +498,59 @@ Example usage for a vertical `PanGestureHandler`.
```js
const translationX = new Value(0);
const state = new Value(State.UNDETERMINED);
const gestureEvent = onGestureEvent({ translationX, state });
return <PanGestureHandler {...gestureEvent} />;
const gestureHandler = onGestureEvent({ translationX, state });
return <PanGestureHandler {...gestureHandler} />;
```
### `panGestureHandler()`
```tsx
const {
gestureEvent,
gestureHandler,
state
translationX,
velocityX,
translationY,
velocityY
} = panGestureHandler();
return (
<PanGestureHandler {...gestureEvent} />
<PanGestureHandler {...gestureHandler} />
);
```
### `horizontalPanGestureHandler()`
```tsx
const {
gestureEvent,
gestureHandler,
state
translationX,
velocityX,
} = horizontalPanGestureHandler();
return (
<PanGestureHandler {...gestureEvent} />
<PanGestureHandler {...gestureHandler} />
);
```
### `verticalPanGestureHandler()`
```tsx
const {
gestureEvent,
gestureHandler,
state
translationY,
velocityY,
} = verticalPanGestureHandler();
return (
<PanGestureHandler {...gestureEvent} />
<PanGestureHandler {...gestureHandler} />
);
```
### `panGestureHandler()`
```tsx
const { gestureEvent, translationX, translationY } = panGestureHandler();
return <PanGestureHandler {...gestureEvent} />;
const { gestureHandler, translationX, translationY } = panGestureHandler();
return <PanGestureHandler {...gestureHandler} />;
```
### `withSpring({ value: Node, velocity: Node, state: Value, offset: Node, config, snapPoints: Node[], onSnap: (value) => void }): Node`
Expand Down

0 comments on commit f1a9e68

Please sign in to comment.