-
-
Save ox1111/02c8af2fa6c6454ff1743851f8c6e52f 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
const style = () => { | |
if (animation) | |
if (action === "next") { | |
return { | |
transform: `translateX(-${(100 / 3) * 2}%)`, | |
transition: "transform 0.1s", | |
}; | |
} else if (action === "prev") { | |
return { | |
transform: `translateX(0%)`, | |
transition: "transform 0.1s", | |
}; | |
} | |
return { | |
transform: `translateX(-${100 / 3}%)`, | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment