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
NOTE: `SwipeableListItem` can be used without `SwipeableList` but swipe blocking on scroll needs to be handled.
42
51
43
-
[MIT](LICENSE).
52
+
## SwipeableList Props
53
+
54
+
### threshold
55
+
56
+
Type: `number`
57
+
58
+
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.
59
+
60
+
## SwipeableListItem Props
61
+
62
+
### blockSwipe
63
+
64
+
Type: `boolean` (default: `false`)
65
+
66
+
If set to `true` all defined swipe actions are blocked. This is done by `SwipeableList` during scroll to prevent mouse move events to cause accidental swiping acitions.
67
+
68
+
### swipeLeft
69
+
70
+
Type: `Object`
71
+
72
+
Data for defining left swipe action and rendering content after item is swiped. The object requires following structure:
73
+
74
+
```js
75
+
{
76
+
action, // required: swipe action (function)
77
+
content, // required: HTML or React component
78
+
}
79
+
```
80
+
81
+
### swipeRight
82
+
83
+
Same as `swipeLeft` but to right. :wink:
84
+
85
+
Type: `Object`
86
+
87
+
### threshold
88
+
89
+
Type: `number` (default: `0.5`)
90
+
91
+
Can be set for whole list or for every item. See `threshold` for `SwipeableList`.
44
92
45
93
## Contributors ✨
46
94
@@ -50,12 +98,16 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
0 commit comments