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`)
117117
118118If set to ` true ` all defined swipe actions are blocked.
119119
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+
120127### swipeLeft
121128
122129Type: ` Object ` (optional)
Original file line number Diff line number Diff line change 2828 "browser" : " dist/react-swipeable-list.umd.js" ,
2929 "peerDependencies" : {
3030 "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 "
3333 },
3434 "devDependencies" : {
3535 "@babel/core" : " 7.13.15" ,
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ interface ISwipeableListItemProps {
3939 * If set to `true` all defined swipe actions are blocked.
4040 */
4141 blockSwipe ?: boolean ;
42+ /**
43+ * Content that is visible by default and swipeable to reveal the left and right views.
44+ */
45+ children : ReactNode ;
4246 /**
4347 * Data for defining left swipe action and rendering content after item is swiped.
4448 */
@@ -71,10 +75,6 @@ interface ISwipeableListItemProps {
7175 * It can be set for the whole list or for every item. See `threshold` for `SwipeableList`. Value from the `SwipeableListItem` takes precedence.
7276 */
7377 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 ;
7878 /**
7979 * Fired after swipe has started (after drag gesture passes the `swipeStartThreshold` distance in pixels).
8080 */
You can’t perform that action at this time.
0 commit comments