Skip to content

Commit 0d8b5af

Browse files
authored
update readme clarify headers
1 parent bbf4bd8 commit 0d8b5af

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class SwipeComponent extends React.Component {
3636
```
3737
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.
3838

39-
## Event Props
39+
## Props / Config Options
40+
41+
### Event Props
4042

4143
**`onSwiping`**, **`onSwipingUp`**, **`onSwipingRight`**, **`onSwipingDown`**, **`onSwipingLeft`**, are called with the event
4244
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
5052

5153
**`onTap`** is called with the onTouchEnd event when the element has been tapped. `this.props.onTap(e)`
5254

53-
#### Configuration Props
55+
### Configuration Props
5456

5557
**`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`.
5658

@@ -68,10 +70,10 @@ as well as the x distance, + or -, from where the swipe started to where it ende
6870
**`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`.
6971

7072
**None of the props are required.**
71-
### PropTypes
73+
### PropType Definitions
7274

75+
#### Event Props:
7376
```
74-
Event Props:
7577
onSwiped: PropTypes.func,
7678
onSwiping: PropTypes.func,
7779
onSwipingUp: PropTypes.func,
@@ -83,8 +85,9 @@ as well as the x distance, + or -, from where the swipe started to where it ende
8385
onSwipedDown: PropTypes.func,
8486
onSwipedLeft: PropTypes.func,
8587
onTap: PropTypes.func,
86-
87-
Config Props:
88+
```
89+
#### Config Props:
90+
```
8891
flickThreshold: PropTypes.number, // default: 0.6
8992
delta: PropTypes.number, // default: 10
9093
preventDefaultTouchmoveEvent: PropTypes.bool, // default: false

0 commit comments

Comments
 (0)