diff --git a/README.md b/README.md index dcd3632..a7a540a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ var MyComponent = React.createClass({ return ( {'Some Text'}} + component={{'Some Text'}} swipeRightTitle={'Delete'} swipeRightTextColor={'#FFFFFF'} swipeRightBackgroundColor={'#000000'} diff --git a/SwipeableElement.js b/SwipeableElement.js index 3533a75..98ca9b2 100644 --- a/SwipeableElement.js +++ b/SwipeableElement.js @@ -113,8 +113,7 @@ var SwipeableElement = React.createClass({ this.props.onSwipeLeft.call(); } } - var animations = require('../../TaskList/animations'); - LayoutAnimation.configureNext(animations.easeInEaseOut); + LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut); this.setState({dx:0,}); this.refs.mainElement && this.refs.mainElement.setNativeProps({ left: 0 }); this.refs.leftElement && this.refs.leftElement.setNativeProps({ width: 0, left: 0, });