Last active
July 25, 2022 13:52
-
-
Save jai-adapptor/207eb5bcd676b269f47cbfd9f447959e to your computer and use it in GitHub Desktop.
5: Animated styles
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
const sheetHeightAnimatedStyle = useAnimatedStyle(() => ({ | |
// The 'worklet' directive is included with useAnimatedStyle hook by default | |
height: -sheetHeight.value, | |
})); | |
const sheetContentAnimatedStyle = useAnimatedStyle(() => ({ | |
paddingBottom: position.value === 'maximised' ? 180 : 0, | |
paddingTop: position.value === 'maximised' ? 40 : 20, | |
paddingHorizontal: 20, | |
})); | |
const sheetNavigationAnimatedStyle = useAnimatedStyle(() => ({ | |
height: navHeight.value, | |
overflow: 'hidden', | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment