Skip to content

Instantly share code, notes, and snippets.

@godswillokokon
Last active March 26, 2020 11:54
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 godswillokokon/f887e833065220463ffb81ce52e3945b to your computer and use it in GitHub Desktop.
Save godswillokokon/f887e833065220463ffb81ce52e3945b to your computer and use it in GitHub Desktop.
Initial App.js
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