Skip to content

Instantly share code, notes, and snippets.

@lintonye
Last active March 29, 2019 21:35
Show Gist options
  • Save lintonye/a2594b866400cb51c11e5610d8d8c1fe to your computer and use it in GitHub Desktop.
Save lintonye/a2594b866400cb51c11e5610d8d8c1fe to your computer and use it in GitHub Desktop.
import { Override, AnimationControls } from "framer";
const anim1 = new AnimationControls();
const anim2 = new AnimationControls();
// Where to call unmount???
anim1.mount();
anim2.mount();
async function animate() {
await anim1.start({ x: 200 });
await anim2.start({ y: -100 });
}
export function Anim1(): Override {
return {
animate: anim1
};
}
export function Anim2(): Override {
return {
animate: anim2
};
}
export function Start(): Override {
return {
onClick: () => animate()
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment