File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,13 @@ Type: `boolean` (optional, default: `false`)
117
117
118
118
If set to ` true ` all defined swipe actions are blocked.
119
119
120
+ #### children
121
+
122
+ Type: ` Anything that can be rendered ` (required)
123
+
124
+ Content that is visible by default and swipeable to reveal the
125
+ left and right views.
126
+
120
127
### swipeLeft
121
128
122
129
Type: ` Object ` (optional)
Original file line number Diff line number Diff line change 28
28
"browser" : " dist/react-swipeable-list.umd.js" ,
29
29
"peerDependencies" : {
30
30
"prop-types" : " ^15.7.2" ,
31
- "react" : " ^16.12.0 || ^17" ,
32
- "react-dom" : " ^16.12.0 || ^17"
31
+ "react" : " ^16.12.0 || ^17 || ^18 " ,
32
+ "react-dom" : " ^16.12.0 || ^17 || ^18 "
33
33
},
34
34
"devDependencies" : {
35
35
"@babel/core" : " 7.13.15" ,
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ interface ISwipeableListItemProps {
39
39
* If set to `true` all defined swipe actions are blocked.
40
40
*/
41
41
blockSwipe ?: boolean ;
42
+ /**
43
+ * Content that is visible by default and swipeable to reveal the left and right views.
44
+ */
45
+ children : ReactNode ;
42
46
/**
43
47
* Data for defining left swipe action and rendering content after item is swiped.
44
48
*/
@@ -71,10 +75,6 @@ interface ISwipeableListItemProps {
71
75
* It can be set for the whole list or for every item. See `threshold` for `SwipeableList`. Value from the `SwipeableListItem` takes precedence.
72
76
*/
73
77
threshold ?: number ;
74
- /**
75
- * Specifying that the children property can be undefined. Especially important for React 18 to eliminate the missing children error
76
- */
77
- children ?: ReactNode | undefined ;
78
78
/**
79
79
* Fired after swipe has started (after drag gesture passes the `swipeStartThreshold` distance in pixels).
80
80
*/
You can’t perform that action at this time.
0 commit comments