Created
October 26, 2018 22:02
-
-
Save stakes/dc63a27fc657f0c6b9f4d0c49b450ad6 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
import { Data, animate, Override, Animatable } from "framer"; | |
const data = Data({ scale: Animatable(1) }); | |
const pulse = async () => { | |
await animate(data.scale, 2).finished; | |
await animate(data.scale, 1).finished; | |
pulse(); | |
}; | |
export const AnimatedElement: Override = props => { | |
pulse(); | |
return { | |
scale: data.scale | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment