-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from nandorojo/transition
Configure `transition` per-variant
- Loading branch information
Showing
6 changed files
with
74 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { Easing } from 'react-native' | ||
import * as Reanimated from 'react-native-reanimated' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { useAnimationState, useDynamicAnimation } from 'moti' | ||
import React from 'react' | ||
|
||
export function App() { | ||
const state = useAnimationState({ | ||
from: { | ||
transition: { | ||
type: 'timing', | ||
}, | ||
}, | ||
}) | ||
const state2 = useDynamicAnimation(() => ({ | ||
scale: 0.5, | ||
transition: { | ||
type: 'timing', | ||
}, | ||
})) | ||
|
||
const toggleTransition = () => { | ||
state.transitionTo('from') | ||
} | ||
|
||
const animateTo = () => { | ||
state2.animateTo({ | ||
opacity: 1, | ||
transition: { | ||
type: 'timing', | ||
}, | ||
}) | ||
} | ||
|
||
return <></> | ||
} |
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
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
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
af8316f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
moti – ./
moti.vercel.app
moti-git-master-fernandorojo.vercel.app
moti-fernandorojo.vercel.app
moti.fyi
www.moti.fyi