diff --git a/components/cycle-day/assets/placeholder.png b/components/cycle-day/assets/placeholder.png deleted file mode 100644 index fb6a6c9..0000000 Binary files a/components/cycle-day/assets/placeholder.png and /dev/null differ diff --git a/components/cycle-day/cycle-day-overview.js b/components/cycle-day/cycle-day-overview.js index 4b75224..19e0084 100644 --- a/components/cycle-day/cycle-day-overview.js +++ b/components/cycle-day/cycle-day-overview.js @@ -2,11 +2,11 @@ import React, { Component } from 'react' import { View, Text, - Image, TouchableOpacity, Dimensions } from 'react-native' -import styles from '../../styles' +import Icon from 'react-native-vector-icons/FontAwesome' +import styles, { iconStyles } from '../../styles' import { bleeding as bleedingLabels, mucusFeeling as feelingLabels, @@ -25,44 +25,37 @@ export default class DayView extends Component { this.showView('BleedingEditView')} + onPress={() => this.props.showView('BleedingEditView')} data={getLabel('bleeding', cycleDay.bleeding)} /> this.showView('TemperatureEditView')} + onPress={() => this.props.showView('TemperatureEditView')} data={getLabel('temperature', cycleDay.temperature)} /> this.showView('MucusEditView')} + onPress={() => this.props.showView('MucusEditView')} data={getLabel('mucus', cycleDay.mucus)} /> this.showView('CervixEditView')} + onPress={() => this.props.showView('CervixEditView')} data={getLabel('cervix', cycleDay.cervix)} /> this.showView('NoteEditView')} + onPress={() => this.props.showView('NoteEditView')} data={getLabel('note', cycleDay.note)} /> this.showView('DesireEditView')} + onPress={() => this.props.showView('DesireEditView')} data={getLabel('desire', cycleDay.desire)} /> this.showView('SexEditView')} + onPress={() => this.props.showView('SexEditView')} data={getLabel('sex', cycleDay.sex)} /> {/* this is just to make the last row adhere to the grid @@ -145,15 +138,23 @@ function getLabel(symptomName, symptom) { class SymptomBox extends Component { render() { + const d = this.props.data + const boxActive = d ? styles.symptomBoxActive : {} + const iconActive = d ? iconStyles.symptomBoxActive : {} + const textStyle = d ? styles.symptomTextActive : {} + + const symptomBoxStyle = Object.assign({}, styles.symptomBox, boxActive) + const iconStyle = Object.assign({}, iconStyles.symptomBox, iconActive) + return ( - - + - {this.props.title} - {this.props.data} + {this.props.title} + {this.props.data} ) diff --git a/styles/index.js b/styles/index.js index 8896f03..087d20d 100644 --- a/styles/index.js +++ b/styles/index.js @@ -58,6 +58,12 @@ export default StyleSheet.create({ minWidth: 100, minHeight: 100, }, + symptomBoxActive: { + backgroundColor: secondaryColor, + }, + symptomTextActive: { + color: fontOnPrimaryColor + }, symptomEditRow: { justifyContent: 'space-between', marginBottom: 10, @@ -121,5 +127,11 @@ export const iconStyles = { navigationArrow: { size: 45, color: fontOnPrimaryColor + }, + symptomBox: { + size: 40 + }, + symptomBoxActive: { + color: fontOnPrimaryColor } } \ No newline at end of file