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
Copy file name to clipboardExpand all lines: README.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,12 @@ type RenderOverlay<T> = (params: {
31
31
openRight: () =>Promise<void>;
32
32
close: () =>Promise<void>;
33
33
}) =>React.ReactNode;
34
+
35
+
enumOpenDirection {
36
+
LEFT="left",
37
+
RIGHT="right",
38
+
NONE=0
39
+
}
34
40
```
35
41
36
42
| Name | Type | Description |
@@ -40,15 +46,15 @@ type RenderOverlay<T> = (params: {
40
46
|`underlayWidthLeft`|`number`| Width of left-swiped underlay. |
41
47
|`underlayWidthRight`|`number`| Width of right-swiped underlay. |
42
48
|`renderOverlay`|`RenderOverlay`| Component to be rendered on top. Use if you need access to programmatic open/close methods. May altenatively pass children to SwipeableItem. |
43
-
|`onChange`|`(params: { open: "left" \| "right" \| "null" }) => void`| Called when row is opened or closed. |
49
+
|`onChange`|`(params: { open: OpenDirection }) => void`| Called when row is opened or closed. |
44
50
|`swipeEnabled`|`boolean`| Enable/disable swipe. Defaults to `true`. |
45
51
|`activationThreshold`|`number`| Distance finger must travel before swipe engages. Defaults to 20. |
0 commit comments