Created
May 22, 2019 16:41
-
-
Save ruucm-working/57f4ede8542c57aebdc056f3357eb5ad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| --- a/adidas-landing.framerfx/code/App.tsx | |
| +++ b/adidas-landing.framerfx/code/App.tsx | |
| @@ -1,4 +1,5 @@ | |
| import { Override, useAnimation, transform } from 'framer' | |
| +import { useState } from 'react' | |
| // Override Docs: https://framer.com/docs/overrides | |
| window.log = console.log | |
| @@ -32,12 +33,7 @@ export function Scroll(): Override { | |
| } | |
| // Label | |
| - label0Anim.start({ | |
| - top: transform(move, [-50, -400], [40, 40 + 350]), | |
| - transition: { | |
| - duration: 0, | |
| - }, | |
| - }) | |
| + setLabel0Top(transform(move, [-50, -400], [40, 40 + 350])) | |
| }, | |
| } | |
| } | |
| @@ -59,10 +55,10 @@ export function Arrow(): Override { | |
| } | |
| } | |
| -var label0Anim | |
| +var label0Top, setLabel0Top | |
| export function Label0(): Override { | |
| - label0Anim = useAnimation() | |
| + ;[label0Top, setLabel0Top] = useState(40) | |
| return { | |
| - animate: label0Anim, | |
| + top: label0Top, | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment