Skip to content

Instantly share code, notes, and snippets.

@jai-adapptor
Last active July 25, 2022 13:52
Show Gist options
  • Select an option

  • Save jai-adapptor/56eba4756b4728f6cac640661675ebf5 to your computer and use it in GitHub Desktop.

Select an option

Save jai-adapptor/56eba4756b4728f6cac640661675ebf5 to your computer and use it in GitHub Desktop.
6: Markup
return (
<View style={styles.container}>
<PanGestureHandler onGestureEvent={onGestureEvent}>
<Animated.View style={[sheetHeightAnimatedStyle, styles.sheet]}>
<View style={styles.handleContainer}>
<View style={styles.handle} />
</View>
<Animated.View style={sheetContentAnimatedStyle}>
<Animated.View style={sheetNavigationAnimatedStyle}>
<TouchableOpacity
style={styles.closeButton}
onPress={() => {
navHeight.value = withSpring(0, springConfig);
sheetHeight.value = withSpring(-expandedHeight, springConfig);
position.value = 'expanded';
}}
>
<Text>{`❌`}</Text>
</TouchableOpacity>
</Animated.View>
<SafeAreaView>
<ScrollView>{props.children}</ScrollView>
</SafeAreaView>
</Animated.View>
</Animated.View>
</PanGestureHandler>
</View>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment