Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sunshine simple Overview component
render() {
const { maxTemperature, minTemperature, weatherType } = this.props;
const today = new Date();
const image = getImageFromWeatherType(weatherType);
return (
<View style={styles.container}>
{!!maxTemperature && !!minTemperature && !!weatherType && !!image && (
<TransitionView style={styles.content}>
<Text style={[theme.typo.mediumText, styles.whiteText]}>
<Text style={[theme.typo.veryBigText, styles.whiteText]}>
<Text style={[theme.typo.bigText, styles.whiteText]}>
<View style={styles.weatherTypeContainer}>
<Image source={image} style={styles.weatherTypeImage} />
<Text style={[theme.typo.mediumText, styles.whiteText]}>
{weatherType.replace(/^\w/, c => c.toUpperCase())}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.