Skip to content

Instantly share code, notes, and snippets.

@lintonye
Created November 21, 2019 20:59
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 lintonye/e30ae2eda18974dfa5cb7e851320b8ff to your computer and use it in GitHub Desktop.
Save lintonye/e30ae2eda18974dfa5cb7e851320b8ff to your computer and use it in GitHub Desktop.
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