Merge branch '213-change-cycle-day-color-in-chart' into 'master'

Resolve "change cycle day color in chart" (depends on !100)

Closes #213

See merge request bloodyhealth/drip!103
This commit is contained in:
tina
2018-11-07 12:24:00 +00:00
4 changed files with 30 additions and 19 deletions
+11 -7
View File
@@ -19,6 +19,7 @@ import MucusIcon from '../../assets/mucus'
import NoteIcon from '../../assets/note'
import PainIcon from '../../assets/pain'
import SexIcon from '../../assets/sex'
import CycleDayIcon from '../../assets/home-circle'
import nothingChanged from '../../db/db-unchanged'
export default class CycleChart extends Component {
@@ -166,13 +167,16 @@ export default class CycleChart extends Component {
<View style={[styles.yAxis, {height: this.columnHeight}]}>
{makeYAxisLabels(this.columnHeight)}
</View>
<View style={[styles.yAxis, {height: this.xAxisHeight}]}>
<AppText style = {[
styles.column.label.number,
styles.yAxisLabels.cycleDayLabel
]}>
{labels.cycleDayWithLinebreak}
</AppText>
<View style={[styles.yAxis, { alignItems: 'center', justifyContent: 'center' }]}>
<Svg
width={styles.yAxis.width * 0.7}
height={styles.yAxis.width * 0.7}
viewBox='325 330 190 190'
>
<G fill="none" stroke="#1E0B7A" strokeWidth="10">
<CycleDayIcon/>
</G>
</Svg>
<AppText style={[
styles.column.label.date,
styles.yAxisLabels.dateLabel
+2 -2
View File
@@ -1,5 +1,5 @@
import config from '../../config'
import {primaryColor, shadesOfRed} from '../../styles/index'
import { shadesOfRed, cycleDayColor } from '../../styles/index'
const colorTemperature = '#765285'
const colorTemperatureLight = '#a67fb5'
@@ -36,7 +36,7 @@ const styles = {
textAlign: 'center',
},
number: {
color: primaryColor,
color: cycleDayColor,
fontSize: numberLabelFontSize,
textAlign: 'center',
}
+11 -2
View File
@@ -2,9 +2,10 @@ import React, { Component } from 'react'
import { ScrollView, View, TouchableOpacity, TouchableHighlight, Dimensions } from 'react-native'
import { LocalDate, ChronoUnit } from 'js-joda'
import Icon from 'react-native-vector-icons/Entypo'
import Svg, { G } from 'react-native-svg'
import { secondaryColor, cycleDayColor, periodColor } from '../styles'
import { home as labels, bleedingPrediction as predictLabels, shared } from './labels'
import CycleCircle from '../assets/home-circle'
import CycleDayIcon from '../assets/home-circle'
import Drop from '../assets/home-drop'
import cycleModule from '../lib/cycle'
import { getOrCreateCycleDay, getCycleDaysSortedByDate } from '../db'
@@ -74,7 +75,15 @@ export default class Home extends Component {
style={styles.homeIconElement}
>
<View position='absolute'>
<CycleCircle/>
<Svg
width={80}
height={80}
viewBox='340 345 170 170'
>
<G fill="none" stroke="#1E0B7A" strokeWidth="2">
<CycleDayIcon/>
</G>
</Svg>
</View>
<View style={[styles.homeIconTextWrapper, styles.wrapperCycle]}>
<AppTextLight style={styles.iconText}>