-
-
Save godswillokokon/f887e833065220463ffb81ce52e3945b to your computer and use it in GitHub Desktop.
Initial App.js
This file contains 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
import React, { useState } from 'react' | |
import { | |
StyleSheet, | |
View, | |
Text, | |
Dimensions, | |
TouchableOpacity, | |
Image | |
} from 'react-native'; | |
const App = () => { | |
return ( | |
<View> | |
<View style={styles.imageContainer}> | |
<Image | |
source={{ uri: 'https://res.cloudinary.com/ogcodes/image/upload/v1581387688/m0e7y6s5zkktpceh2moq.jpg' }} | |
style={styles.backgroundImage}> | |
</Image> | |
</View> | |
<View style={styles.uploadContainer}> | |
<Text style={styles.uploadContainerTitle}> | |
ImagePicker to Cloudinary | |
</Text> | |
<TouchableOpacity style={styles.uploadButton}> | |
<Text style={styles.uploadButtonText}> | |
Upload | |
</Text> | |
</TouchableOpacity> | |
</View> | |
</View > | |
); | |
}; | |
const styles = StyleSheet.create({ | |
imageContainer: { | |
backgroundColor: '#fe5b29', | |
height: Dimensions.get('window').height | |
}, | |
backgroundImage: { | |
flex: 1, | |
resizeMode: 'cover', | |
}, | |
uploadContainer: { | |
backgroundColor: '#f6f5f8', | |
borderTopLeftRadius: 45, | |
borderTopRightRadius: 45, | |
position: 'absolute', | |
bottom: 0, | |
width: Dimensions.get('window').width, | |
height: 200, | |
}, | |
uploadContainerTitle: { | |
alignSelf: 'center', | |
fontSize: 25, | |
margin: 20, | |
fontFamily: 'Roboto' | |
}, | |
uploadButton: { | |
borderRadius: 16, | |
alignSelf: 'center', | |
shadowColor: "#000", | |
shadowOffset: { | |
width: 7, | |
height: 5, | |
}, | |
shadowOpacity: 1.58, | |
shadowRadius: 9, | |
elevation: 4, | |
margin: 10, | |
padding: 10, | |
backgroundColor: '#fe5b29', | |
width: Dimensions.get('window').width - 60, | |
alignItems: 'center' | |
}, | |
uploadButtonText: { | |
color: '#f6f5f8', | |
fontSize: 20, | |
fontFamily: 'Roboto' | |
} | |
}); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment