diff --git a/app.js b/app.js
index 7735256..0c951c8 100644
--- a/app.js
+++ b/app.js
@@ -7,7 +7,7 @@ import Chart from './components/chart/chart'
import Settings from './components/settings'
import Stats from './components/stats'
-import styles from './styles'
+import styles, { primaryColor } from './styles'
// this is until react native fixes this bugg, see
// https://github.com/facebook/react-native/issues/18868#issuecomment-382671739
@@ -26,9 +26,9 @@ const config = {
labeled: true,
shifting: false,
tabBarOptions: {
- style: {backgroundColor: '#ff7e5f'},
- labelStyle: {fontSize: 15, color: 'white'}
- },
+ style: {backgroundColor: primaryColor },
+ labelStyle: styles.menuLabel
+ }
}
export default createBottomTabNavigator(routes, config)
\ No newline at end of file
diff --git a/components/cycle-day/assets/placeholder.png b/components/cycle-day/assets/placeholder.png
new file mode 100644
index 0000000..fb6a6c9
Binary files /dev/null and b/components/cycle-day/assets/placeholder.png differ
diff --git a/components/cycle-day/cycle-day-overview.js b/components/cycle-day/cycle-day-overview.js
index b127b74..dee8a9e 100644
--- a/components/cycle-day/cycle-day-overview.js
+++ b/components/cycle-day/cycle-day-overview.js
@@ -1,8 +1,9 @@
import React, { Component } from 'react'
import {
View,
- Button,
- Text
+ Text,
+ Image,
+ TouchableOpacity
} from 'react-native'
import styles from '../../styles'
import {
@@ -48,70 +49,50 @@ export default class DayView extends Component {
const cycleDay = this.cycleDay
return (
-
- Bleeding
-
-
-
-
-
- Temperature
-
-
-
-
-
- Mucus
-
-
-
-
-
- Cervix
-
-
-
-
-
- Note
-
-
-
-
-
- Desire
-
-
-
-
-
- Sex
-
-
-
-
+
+ this.showView('BleedingEditView')}
+ data={getLabel('bleeding', cycleDay.bleeding)}
+ />
+ this.showView('TemperatureEditView')}
+ data={getLabel('temperature', cycleDay.temperature)}
+ />
+ this.showView('MucusEditView')}
+ data={getLabel('mucus', cycleDay.mucus)}
+ />
+ this.showView('CervixEditView')}
+ data={getLabel('cervix', cycleDay.cervix)}
+ />
+ this.showView('NoteEditView')}
+ data={getLabel('note', cycleDay.note)}
+ />
+ this.showView('DesireEditView')}
+ data={getLabel('desire', cycleDay.desire)}
+ />
+ this.showView('SexEditView')}
+ data={getLabel('sex', cycleDay.sex)}
+ />
+
)
}
@@ -186,3 +167,20 @@ function getLabel(symptomName, symptom) {
if (!symptom) return 'edit'
return labels[symptomName](symptom) || 'edit'
}
+
+class SymptomBox extends Component {
+ render() {
+ return (
+
+
+
+ {this.props.title}
+ {this.props.data}
+
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/components/cycle-day/index.js b/components/cycle-day/index.js
index 94bb51e..fab2b2e 100644
--- a/components/cycle-day/index.js
+++ b/components/cycle-day/index.js
@@ -5,7 +5,6 @@ import {
ScrollView
} from 'react-native'
import cycleModule from '../../lib/cycle'
-import { getFertilityStatusStringForDay } from '../../lib/sympto-adapter'
import { formatDateForViewHeader } from './labels/format'
import styles from '../../styles'
import actionButtonModule from './action-buttons'
@@ -50,23 +49,16 @@ export default class Day extends Component {
render() {
const cycleDayNumber = getCycleDayNumber(this.cycleDay.date)
- const fertilityStatus = getFertilityStatusStringForDay(this.cycleDay.date)
return (
{formatDateForViewHeader(this.cycleDay.date)}
-
-
{ cycleDayNumber &&
Cycle day {cycleDayNumber}
}
-
-
- {fertilityStatus}
-
{ this.cycleDayViews[this.state.visibleComponent] }
diff --git a/components/cycle-day/symptoms/bleeding.js b/components/cycle-day/symptoms/bleeding.js
index 7ec0574..ffd1836 100644
--- a/components/cycle-day/symptoms/bleeding.js
+++ b/components/cycle-day/symptoms/bleeding.js
@@ -32,28 +32,30 @@ export default class Bleeding extends Component {
{ label: labels[3], value: 3 },
]
return (
-
- Bleeding
-
- {
- this.setState({ currentValue: itemValue })
- }}
- />
-
-
- Exclude
- {
- this.setState({ exclude: val })
- }}
- value={this.state.exclude}
- />
+
+
+ Bleeding
+
+ {
+ this.setState({ currentValue: itemValue })
+ }}
+ />
+
+
+ Exclude
+ {
+ this.setState({ exclude: val })
+ }}
+ value={this.state.exclude}
+ />
+
{this.makeActionButtons(
diff --git a/styles/index.js b/styles/index.js
index fde1700..9197f31 100644
--- a/styles/index.js
+++ b/styles/index.js
@@ -1,5 +1,8 @@
import { StyleSheet } from 'react-native'
+export const primaryColor = '#ff7e5f'
+export const secondaryColor = '#351c4d'
+
export default StyleSheet.create({
container: {
justifyContent: 'center',
@@ -12,31 +15,46 @@ export default StyleSheet.create({
textAlignVertical: 'center'
},
dateHeader: {
- fontSize: 20,
+ fontSize: 18,
fontWeight: 'bold',
- margin: 15,
color: 'white',
textAlign: 'center',
- textAlignVertical: 'center'
},
cycleDayNumber: {
- fontSize: 18,
+ fontSize: 15,
+ color: 'white',
textAlign: 'center',
- textAlignVertical: 'center'
+ marginLeft: 15
},
symptomDayView: {
fontSize: 20,
textAlignVertical: 'center'
},
+ symptomBoxImage: {
+ width: 50,
+ height: 50
+ },
radioButton: {
fontSize: 18,
margin: 8,
textAlign: 'center',
textAlignVertical: 'center'
},
- symptomEditView: {
- justifyContent: 'space-between',
- marginHorizontal: 15
+ symptomBoxesView: {
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ justifyContent: 'space-evenly'
+ },
+ symptomBox: {
+ borderColor: secondaryColor,
+ borderStyle: 'solid',
+ borderWidth: 1,
+ borderRadius: 10,
+ justifyContent: 'center',
+ alignItems: 'center',
+ marginTop: '20%',
+ minWidth: 100,
+ minHeight: 100
},
symptomEditRow: {
justifyContent: 'space-between',
@@ -50,14 +68,11 @@ export default StyleSheet.create({
height: 50
},
cycleDayDateView: {
+ backgroundColor: primaryColor,
+ padding: 10,
+ flexDirection: 'row',
justifyContent: 'center',
- backgroundColor: 'steelblue'
- },
- cycleDayNumberView: {
- justifyContent: 'center',
- backgroundColor: 'skyblue',
- marginBottom: 15,
- paddingVertical: 15
+ alignItems: 'center'
},
homeButtons: {
marginHorizontal: 15
@@ -88,5 +103,9 @@ export default StyleSheet.create({
margin: 30,
textAlign: 'left',
textAlignVertical: 'center'
- }
+ },
+ menuLabel: {
+ fontSize: 15,
+ color: 'white'
+ },
})
\ No newline at end of file