Created
November 21, 2019 20:59
-
-
Save lintonye/e30ae2eda18974dfa5cb7e851320b8ff 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
export function ChatHead(props): Override { | |
const anim = useAnimation() | |
return { | |
drag: true, | |
animate: anim, | |
onDragStart: () => { | |
appState.bottomSheetY = 0 | |
}, | |
onDragEnd: (_, info) => { | |
appState.bottomSheetY = bottomSheetHeight | |
if (info.point.y > 400) { | |
anim.start({ x: 0, y: 400 }) | |
} else { | |
anim.start({ x: 0 }) | |
} | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment