Merge branch 'master' into '150-apply-design-to-chart'

# Conflicts:
#   components/calendar.js
#   components/chart/y-axis.js
This commit is contained in:
tina
2018-09-14 11:28:38 +00:00
57 changed files with 2118 additions and 1268 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
import { View, FlatList, Text } from 'react-native'
import { View, FlatList } from 'react-native'
import range from 'date-range'
import { LocalDate } from 'js-joda'
import { makeYAxisLabels, normalizeToScale, makeHorizontalGrid } from './y-axis'
@@ -9,6 +9,7 @@ import { getCycleDay, cycleDaysSortedByDate, getAmountOfCycleDays } from '../../
import styles from './styles'
import { scaleObservable } from '../../local-storage'
import config from '../../config'
import { AppText } from '../app-text'
export default class CycleChart extends Component {
constructor(props) {
@@ -126,7 +127,7 @@ export default class CycleChart extends Component {
>
{!this.state.chartLoaded &&
<View style={{width: '100%', justifyContent: 'center', alignItems: 'center'}}>
<Text>Loading...</Text>
<AppText>Loading...</AppText>
</View>
}
+1 -1
View File
@@ -182,4 +182,4 @@ export default class DayColumn extends Component {
</View>
)
}
}
}
+4 -3
View File
@@ -1,8 +1,9 @@
import React from 'react'
import { Text, View } from 'react-native'
import { View } from 'react-native'
import config from '../../config'
import styles from './styles'
import { scaleObservable, unitObservable } from '../../local-storage'
import { AppText } from '../app-text'
export function makeYAxisLabels(columnHeight) {
const units = unitObservable.value
@@ -25,11 +26,11 @@ export function makeYAxisLabels(columnHeight) {
// support percentage values for transforms, which we'd need
// to reliably place the label vertically centered to the grid
return (
<Text
<AppText
style={[style, {top: y - 8}, tickBold]}
key={i}>
{showTick && tickLabel}
</Text>
</AppText>
)
})
}