You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,9 @@ class SwipeComponent extends React.Component {
36
36
```
37
37
react-swipeable generates a React element(`<div>` by default) under the hood and binds touch events to it which in turn are used to fire the `swiped` and `swiping` props.
38
38
39
-
## Event Props
39
+
## Props / Config Options
40
+
41
+
### Event Props
40
42
41
43
**`onSwiping`**, **`onSwipingUp`**, **`onSwipingRight`**, **`onSwipingDown`**, **`onSwipingLeft`**, are called with the event
42
44
as well as the absolute delta of where the swipe started and where it's currently at. These constantly fire throughout touch events.
@@ -50,7 +52,7 @@ as well as the x distance, + or -, from where the swipe started to where it ende
50
52
51
53
**`onTap`** is called with the onTouchEnd event when the element has been tapped. `this.props.onTap(e)`
52
54
53
-
####Configuration Props
55
+
### Configuration Props
54
56
55
57
**`flickThreshold`** is a number (float) which determines the max velocity of a swipe before it's considered a flick. The default value is `0.6`.
56
58
@@ -68,10 +70,10 @@ as well as the x distance, + or -, from where the swipe started to where it ende
68
70
**`trackMouse`** will allow mouse 'swipes' to be tracked(click, hold, move, let go). See [#51](https://github.com/dogfessional/react-swipeable/issues/51) for more details. The default value is `false`.
69
71
70
72
**None of the props are required.**
71
-
### PropTypes
73
+
### PropType Definitions
72
74
75
+
#### Event Props:
73
76
```
74
-
Event Props:
75
77
onSwiped: PropTypes.func,
76
78
onSwiping: PropTypes.func,
77
79
onSwipingUp: PropTypes.func,
@@ -83,8 +85,9 @@ as well as the x distance, + or -, from where the swipe started to where it ende
0 commit comments