daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Data, animate, Override, Animatable } from "framer"
  2.  
  3. const data = Data({
  4.     scale: Animatable(1),
  5.     opacity: Animatable(0)
  6.  })
  7.  
  8. export const Scale: Override = () => {
  9.     return {
  10.         scale: data.scale,
  11.         onTap() {
  12.             data.scale.set(0.6)
  13.             animate.spring(data.scale, 1)
  14.         },
  15.     }
  16. }
  17.  
  18.  
  19. export const Fade: Override = props => {
  20.     data.opacity.set(props.opacity)
  21.  
  22.     return {
  23.         opacity: data.opacity,
  24.         onTap() {
  25.             animate.linear(data.opacity, 0, 0.2)
  26.         },
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top