Skip to content

Instantly share code, notes, and snippets.

@Gguigre
Created January 16, 2019 20:52
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 Gguigre/bf5dde5c529bdb0cca302b1abf73f76f to your computer and use it in GitHub Desktop.
Save Gguigre/bf5dde5c529bdb0cca302b1abf73f76f to your computer and use it in GitHub Desktop.
Sunshine basic Overview component
render() {
return (
<View style={styles.container}>
<View style={styles.content}>
<View>
<Text style={[theme.typo.mediumText, styles.whiteText]}>
{today.toDateString()}
</Text>
<Text style={[theme.typo.veryBigText, styles.whiteText]}>
{maxTemperature ? `${maxTemperature}°` : ""}
</Text>
<Text style={[theme.typo.bigText, styles.whiteText]}>
{minTemperature ? `${minTemperature}°` : ""}
</Text>
</View>
<View style={styles.weatherTypeContainer}>
<Image source={image} style={styles.weatherTypeImage} />
<Text style={[theme.typo.mediumText, styles.whiteText]}>
{weatherType && weatherType.replace(/^\w/, c => c.toUpperCase())}
</Text>
</View>
</View>
</View>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment