Skip to content

Commit c9c4cad

Browse files
author
Marek Rozmus
committed
Update readme file with new props description
1 parent abf3277 commit c9c4cad

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

β€Ž.all-contributorsrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
{
2020
"login": "marekrozmus",
21-
"name": "marekrozmus",
21+
"name": "Marek Rozmus",
2222
"avatar_url": "https://avatars3.githubusercontent.com/u/26272040?v=4",
2323
"profile": "https://github.com/marekrozmus",
2424
"contributions": [

β€ŽREADME.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,30 @@ NOTE: `SwipeableListItem` can be used without `SwipeableList` but swipe blocking
6363

6464
## SwipeableList Props
6565

66-
### scrollElement
66+
### scrollStartThreshold
6767

68-
Type: `EventTarget`
68+
Type: `number` (default: `10`)
6969

70-
Required to block swipe during scroll outside of the `SwipeableList` e.g. set to `window.document` to block swipes during body scroll.
70+
How far (in pixels) scroll needs to be done to enable block list item swiping. When scrolling is started swiping cannot be done.
71+
72+
Can be set for whole list or for every item. See `scrollStartThreshold` for `SwipeableListItem`.
73+
74+
### swipeStartThreshold
75+
76+
Type: `number` (default: `10`)
77+
78+
How far (in pixels) swipe needs to be done to enable start swiping on list item. When swiping is started scrolling cannot be done.
79+
80+
Can be set for whole list or for every item. See `swipeStartThreshold` for `SwipeableListItem`.
7181

7282
### threshold
7383

74-
Type: `number`
84+
Type: `number` (default: `0.5`)
7585

7686
How far swipe needs to be done to trigger attached action. `0.5` means that item needs to be swiped to half of its width, `0.25` - one-quarter of width.
7787

88+
Can be set for whole list or for every item. See `threshold` for `SwipeableListItem`.
89+
7890
## SwipeableListItem Props
7991

8092
### blockSwipe
@@ -102,6 +114,20 @@ Type: `Object`
102114

103115
Same as `swipeLeft` but to right. :wink:
104116

117+
### scrollStartThreshold
118+
119+
Type: `number` (default: `10`)
120+
121+
Can be set for whole list or for every item. See `scrollStartThreshold` for `SwipeableList`.
122+
123+
### swipeStartThreshold
124+
125+
Type: `number` (default: `10`)
126+
127+
How far swipe needs to be done to enable start swiping on list item. When swiping is started scrolling cannot be done.
128+
129+
Can be set for whole list or for every item. See `swipeStartThreshold` for `SwipeableList`.
130+
105131
### threshold
106132

107133
Type: `number` (default: `0.5`)
@@ -117,7 +143,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
117143
<table>
118144
<tr>
119145
<td align="center"><a href="https://github.com/sandstreamdevelopment"><img src="https://avatars2.githubusercontent.com/u/44231396?v=4" width="100px;" alt="sandstreamdevelopment"/><br /><sub><b>sandstreamdevelopment</b></sub></a><br /><a href="#business-sandstreamdevelopment" title="Business development">πŸ’Ό</a> <a href="#financial-sandstreamdevelopment" title="Financial">πŸ’΅</a> <a href="#ideas-sandstreamdevelopment" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
120-
<td align="center"><a href="https://github.com/marekrozmus"><img src="https://avatars3.githubusercontent.com/u/26272040?v=4" width="100px;" alt="marekrozmus"/><br /><sub><b>marekrozmus</b></sub></a><br /><a href="https://github.com/sandstreamdev/react-swipeable-list/commits?author=marekrozmus" title="Code">πŸ’»</a> <a href="https://github.com/sandstreamdev/react-swipeable-list/commits?author=marekrozmus" title="Documentation">πŸ“–</a> <a href="https://github.com/sandstreamdev/react-swipeable-list/commits?author=marekrozmus" title="Tests">⚠️</a> <a href="#example-marekrozmus" title="Examples">πŸ’‘</a> <a href="#ideas-marekrozmus" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
146+
<td align="center"><a href="https://github.com/marekrozmus"><img src="https://avatars3.githubusercontent.com/u/26272040?v=4" width="100px;" alt="Marek Rozmus"/><br /><sub><b>Marek Rozmus</b></sub></a><br /><a href="https://github.com/sandstreamdev/react-swipeable-list/commits?author=marekrozmus" title="Code">πŸ’»</a> <a href="https://github.com/sandstreamdev/react-swipeable-list/commits?author=marekrozmus" title="Documentation">πŸ“–</a> <a href="https://github.com/sandstreamdev/react-swipeable-list/commits?author=marekrozmus" title="Tests">⚠️</a> <a href="#example-marekrozmus" title="Examples">πŸ’‘</a> <a href="#ideas-marekrozmus" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
121147
<td align="center"><a href="https://github.com/jakubbogacz"><img src="https://avatars3.githubusercontent.com/u/26272028?v=4" width="100px;" alt="jakubbogacz"/><br /><sub><b>jakubbogacz</b></sub></a><br /><a href="#review-jakubbogacz" title="Reviewed Pull Requests">πŸ‘€</a> <a href="#ideas-jakubbogacz" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="https://github.com/sandstreamdev/react-swipeable-list/commits?author=jakubbogacz" title="Documentation">πŸ“–</a></td>
122148
<td align="center"><a href="https://github.com/LukasMarx"><img src="https://avatars0.githubusercontent.com/u/8080408?v=4" width="100px;" alt="Lukas Marx"/><br /><sub><b>Lukas Marx</b></sub></a><br /><a href="#ideas-LukasMarx" title="Ideas, Planning, & Feedback">πŸ€”</a></td>
123149
<td align="center"><a href="https://www.linkedin.com/in/luis-filipe42/"><img src="https://avatars1.githubusercontent.com/u/29440533?v=4" width="100px;" alt="Luis Filipe Pedroso"/><br /><sub><b>Luis Filipe Pedroso</b></sub></a><br /><a href="https://github.com/sandstreamdev/react-swipeable-list/issues?q=author%3ALuisFilipePedroso" title="Bug reports">πŸ›</a></td>

0 commit comments

Comments
Β (0)