@@ -16,7 +16,7 @@ import ReanimatedSwipeable, {
1616
1717import { useSwipeRegistryContext } from '../../contexts/swipeableContext/SwipeRegistryContext' ;
1818
19- const ACTION_WIDTH = 50 ;
19+ const ACTION_WIDTH = 80 ;
2020const DEFAULT_RIGHT_ACTIONS_WIDTH = ACTION_WIDTH * 2 ;
2121
2222const animationOptions = {
@@ -53,12 +53,6 @@ export const SwipableWrapper = ({ children, swipeableId, swipableProps }: Swipab
5353 const swipeRegistry = useSwipeRegistryContext ( ) ;
5454 const swipeableRef = useRef < SwipeableMethods | null > ( null ) ;
5555
56- const {
57- onSwipeableWillOpen : onSwipeableWillOpenFromProps ,
58- renderRightActions : renderRightActionsFromProps ,
59- ...restSwipableProps
60- } = swipableProps ?? { } ;
61-
6256 const defaultRenderRightActions = useCallback (
6357 ( _progress : SharedValue < number > , translation : SharedValue < number > ) => (
6458 < DefaultRightActions translation = { translation } />
@@ -81,9 +75,9 @@ export const SwipableWrapper = ({ children, swipeableId, swipableProps }: Swipab
8175 if ( swipeRegistry && swipeableId ) {
8276 swipeRegistry . notifyWillOpen ( swipeableId ) ;
8377 }
84- onSwipeableWillOpenFromProps ?.( direction ) ;
78+ swipableProps ?. onSwipeableWillOpen ?.( direction ) ;
8579 } ,
86- [ onSwipeableWillOpenFromProps , swipeRegistry , swipeableId ] ,
80+ [ swipableProps , swipeRegistry , swipeableId ] ,
8781 ) ;
8882
8983 return (
@@ -96,8 +90,8 @@ export const SwipableWrapper = ({ children, swipeableId, swipableProps }: Swipab
9690 overshootRight = { true }
9791 overshootFriction = { 16 }
9892 renderLeftActions = { undefined }
99- renderRightActions = { renderRightActionsFromProps ?? defaultRenderRightActions }
100- { ...restSwipableProps }
93+ renderRightActions = { defaultRenderRightActions }
94+ { ...swipableProps }
10195 >
10296 { children }
10397 </ ReanimatedSwipeable >
0 commit comments