Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Data, animate, Override, Animatable } from "framer"
- const data = Data({
- scale: Animatable(1),
- opacity: Animatable(0)
- })
- export const Scale: Override = () => {
- return {
- scale: data.scale,
- onTap() {
- data.scale.set(0.6)
- animate.spring(data.scale, 1)
- },
- }
- }
- export const Fade: Override = props => {
- data.opacity.set(props.opacity)
- return {
- opacity: data.opacity,
- onTap() {
- animate.linear(data.opacity, 0, 0.2)
- },
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement