Created
March 20, 2018 11:11
-
-
Save ashrithks/50db632338ba811104dec79635634b98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let SlideFromRight = (index, position, width) => { | |
const inputRange = [index - 1, index, index + 1]; | |
const translateX = position.interpolate({ | |
inputRange: [index - 1, index, index + 1], | |
outputRange: [width, 0, 0] | |
}) | |
const slideFromRight = { transform: [{ translateX }] } | |
return slideFromRight | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment