Created
November 24, 2019 23:30
-
-
Save YKalashnikov/9b8ac02dbe520f8db4f6b27ff23f847a to your computer and use it in GitHub Desktop.
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 from 'react'; | |
import { View, Text, StyleSheet } from 'react-native'; | |
import { MaterialCommunityIcons } from '@expo/vector-icons'; | |
const Weather = () => { | |
return ( | |
<View style={styles.weatherContainer}> | |
<View style={styles.headerContainer}> | |
<MaterialCommunityIcons size={48} name="weather-sunny" color={'#fff'} /> | |
<Text style={styles.tempText}>Temperature˚</Text> | |
</View> | |
<View style={styles.bodyContainer}> | |
<Text style={styles.title}>So Sunny</Text> | |
<Text style={styles.subtitle}>Grab some sunglasses!!</Text> | |
</View> | |
</View> | |
); | |
}; | |
const styles = StyleSheet.create({ | |
weatherContainer: { | |
flex: 1 | |
}, | |
headerContainer: { | |
flex: 1, | |
flexDirection: 'row', | |
alignItems: 'center', | |
justifyContent: 'space-around' | |
}, | |
tempText: { | |
fontSize: 65, | |
color: '#fff' | |
}, | |
bodyContainer: { | |
flex: 2, | |
alignItems: 'flex-start', | |
justifyContent: 'flex-end', | |
paddingLeft: 25, | |
marginBottom: 100 | |
}, | |
title: { | |
fontSize: 60, | |
color: '#fff' | |
}, | |
subtitle: { | |
fontSize: 24, | |
color: '#fff' | |
}, | |
time: { | |
fontSize: 38, | |
color: '#fff' | |
} | |
}); | |
export default Weather; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment