Skip to content

Instantly share code, notes, and snippets.

@timothyde
Created May 31, 2019 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timothyde/8e924824c2c50e6f32833e4e9af5d81f to your computer and use it in GitHub Desktop.
Save timothyde/8e924824c2c50e6f32833e4e9af5d81f to your computer and use it in GitHub Desktop.
const PosedTopBar = posed(TopBar)({
open: {
opacity: 1,
transition: {
duration: 50
}
},
closed: {
delay: 200,
opacity: 0,
transition: {
duration: 150
}
}
});
const PosedMain = posed(Main)({
closed: {
rotateX: '180deg',
opacity: 0,
scaleY: 0.2,
transition: {
type: 'tween',
duration: 150
},
applyAtEnd: { display: 'none' },
delay: 150
},
open: {
rotateX: '0deg',
opacity: 1,
scaleY: 1,
transition: {
type: 'tween',
duration: 150
},
applyAtStart: { display: 'block' }
}
});
const PosedActions = posed(Actions)({
closed: {
rotateX: '180deg',
opacity: 0,
transition: {
type: 'tween',
duration: 150
},
applyAtEnd: { display: 'none' }
},
open: {
rotateX: '0deg',
opacity: 1,
transition: {
type: 'spring',
mass: 0.5
},
delay: 150,
applyAtStart: { display: 'block' }
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment