Skip to content

Commit 5f2f4c1

Browse files
Merge pull request #230 from sandstreamdev/issue229_fix_bug_in_ISwipeableListItemProps_interface
fix: adjust children type to be compatible with React 18
2 parents 9243955 + 5a33117 commit 5f2f4c1

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ Type: `boolean` (optional, default: `false`)
117117

118118
If 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 left and right views.
125+
120126
### swipeLeft
121127

122128
Type: `Object` (optional)

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
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",

src/module.d.ts

+4
Original file line numberDiff line numberDiff 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
*/

0 commit comments

Comments
 (0)