diff --git a/src/index.js b/src/index.js index 244bf99..8dc55a1 100644 --- a/src/index.js +++ b/src/index.js @@ -23,7 +23,7 @@ export default class Swipeable extends PureComponent { onLeftActionComplete: PropTypes.func, leftActionActivationDistance: PropTypes.number, leftActionReleaseAnimationFn: PropTypes.func, - leftActionReleaseAnimationConfig: PropTypes.object, + leftActionReleaseAnimationConfig: PropTypes.func, // right action lifecycle onRightActionActivate: PropTypes.func, @@ -32,7 +32,7 @@ export default class Swipeable extends PureComponent { onRightActionComplete: PropTypes.func, rightActionActivationDistance: PropTypes.number, rightActionReleaseAnimationFn: PropTypes.func, - rightActionReleaseAnimationConfig: PropTypes.object, + rightActionReleaseAnimationConfig: PropTypes.func, // left buttons lifecycle onLeftButtonsActivate: PropTypes.func, @@ -592,11 +592,11 @@ export default class Swipeable extends PureComponent { } = this.state; if (leftActionActivated && leftActionReleaseAnimationConfig) { - return leftActionReleaseAnimationConfig; + return leftActionReleaseAnimationConfig(); } if (rightActionActivated && rightActionReleaseAnimationConfig) { - return rightActionReleaseAnimationConfig; + return rightActionReleaseAnimationConfig(); } if (leftButtonsActivated) {