Last active
July 25, 2022 13:52
-
-
Save jai-adapptor/937238d7bd8813a71e4865552da25616 to your computer and use it in GitHub Desktop.
7: 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 styles = StyleSheet.create({ | |
// The sheet is positioned absolutely to sit at the bottom of the screen | |
container: { | |
position: 'absolute', | |
bottom: 0, | |
left: 0, | |
right: 0, | |
}, | |
sheet: { | |
justifyContent: 'flex-start', | |
backgroundColor: '#FFFFFF', | |
// Round the top corners | |
borderTopLeftRadius: 20, | |
borderTopRightRadius: 20, | |
minHeight: 80, | |
// Add a shadow to the top of the sheet | |
shadowColor: '#000', | |
shadowOffset: { | |
width: 0, | |
height: -2, | |
}, | |
shadowOpacity: 0.23, | |
shadowRadius: 2.62, | |
elevation: 4, | |
}, | |
handleContainer: { | |
alignItems: 'center', | |
justifyContent: 'center', | |
paddingTop: 10, | |
}, | |
// Add a small handle component to indicate the sheet can be dragged | |
handle: { | |
width: '15%', | |
height: 4, | |
borderRadius: 8, | |
backgroundColor: '#CCCCCC', | |
}, | |
closeButton: { | |
width: NAV_HEIGHT, | |
height: NAV_HEIGHT, | |
borderRadius: NAV_HEIGHT, | |
alignItems: 'center', | |
justifyContent: 'center', | |
alignSelf: 'flex-start', | |
marginBottom: 10, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment