uses cycle day symbol in chart and corresponding color
This commit is contained in:
@@ -1,16 +1,14 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Svg, { G, Path } from 'react-native-svg'
|
import { G, Path } from 'react-native-svg'
|
||||||
|
|
||||||
export default function HomeCycleIcon() {
|
export default function CycleDayIcon() {
|
||||||
return (
|
return (
|
||||||
<Svg width={80} height={80} viewBox='340 345 170 170'>
|
<G>
|
||||||
<G>
|
<Path d="M379.708,350.568
|
||||||
<Path fill="none" stroke="#1E0B7A" strokeWidth="2" d="M379.708,350.568
|
|
||||||
C356.431,365.455,341,391.529,341,421.21c0,46.275,37.515,83.79,83.791,83.79s83.79-37.515,83.79-83.79
|
C356.431,365.455,341,391.529,341,421.21c0,46.275,37.515,83.79,83.791,83.79s83.79-37.515,83.79-83.79
|
||||||
c0-31.784-17.696-59.436-43.773-73.637"/>
|
c0-31.784-17.696-59.436-43.773-73.637"/>
|
||||||
<Path fill="none" stroke="#1E0B7A" strokeWidth="2" d="M383.809,369.885v-18.398
|
<Path d="M383.809,369.885v-18.398
|
||||||
c0,0,0-4.843-4.842-4.843h-18.399"/>
|
c0,0,0-4.843-4.842-4.843h-18.399"/>
|
||||||
</G>
|
</G>
|
||||||
</Svg>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,7 @@ import MucusIcon from '../../assets/mucus'
|
|||||||
import NoteIcon from '../../assets/note'
|
import NoteIcon from '../../assets/note'
|
||||||
import PainIcon from '../../assets/pain'
|
import PainIcon from '../../assets/pain'
|
||||||
import SexIcon from '../../assets/sex'
|
import SexIcon from '../../assets/sex'
|
||||||
|
import CycleDayIcon from '../../assets/home-circle'
|
||||||
import nothingChanged from '../../db/db-unchanged'
|
import nothingChanged from '../../db/db-unchanged'
|
||||||
|
|
||||||
export default class CycleChart extends Component {
|
export default class CycleChart extends Component {
|
||||||
@@ -166,13 +167,16 @@ export default class CycleChart extends Component {
|
|||||||
<View style={[styles.yAxis, {height: this.columnHeight}]}>
|
<View style={[styles.yAxis, {height: this.columnHeight}]}>
|
||||||
{makeYAxisLabels(this.columnHeight)}
|
{makeYAxisLabels(this.columnHeight)}
|
||||||
</View>
|
</View>
|
||||||
<View style={[styles.yAxis, {height: this.xAxisHeight}]}>
|
<View style={[styles.yAxis, { alignItems: 'center', justifyContent: 'center' }]}>
|
||||||
<AppText style = {[
|
<Svg
|
||||||
styles.column.label.number,
|
width={styles.yAxis.width * 0.7}
|
||||||
styles.yAxisLabels.cycleDayLabel
|
height={styles.yAxis.width * 0.7}
|
||||||
]}>
|
viewBox='325 330 185 185'
|
||||||
{labels.cycleDayWithLinebreak}
|
>
|
||||||
</AppText>
|
<G fill="none" stroke="#1E0B7A" strokeWidth="10">
|
||||||
|
<CycleDayIcon/>
|
||||||
|
</G>
|
||||||
|
</Svg>
|
||||||
<AppText style={[
|
<AppText style={[
|
||||||
styles.column.label.date,
|
styles.column.label.date,
|
||||||
styles.yAxisLabels.dateLabel
|
styles.yAxisLabels.dateLabel
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import config from '../../config'
|
import config from '../../config'
|
||||||
import {primaryColor, shadesOfRed} from '../../styles/index'
|
import { shadesOfRed, cycleDayColor } from '../../styles/index'
|
||||||
|
|
||||||
const colorTemperature = '#765285'
|
const colorTemperature = '#765285'
|
||||||
const colorTemperatureLight = '#a67fb5'
|
const colorTemperatureLight = '#a67fb5'
|
||||||
@@ -36,7 +36,7 @@ const styles = {
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
number: {
|
number: {
|
||||||
color: primaryColor,
|
color: cycleDayColor,
|
||||||
fontSize: numberLabelFontSize,
|
fontSize: numberLabelFontSize,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-2
@@ -2,9 +2,10 @@ import React, { Component } from 'react'
|
|||||||
import { ScrollView, View, TouchableOpacity, TouchableHighlight, Dimensions } from 'react-native'
|
import { ScrollView, View, TouchableOpacity, TouchableHighlight, Dimensions } from 'react-native'
|
||||||
import { LocalDate, ChronoUnit } from 'js-joda'
|
import { LocalDate, ChronoUnit } from 'js-joda'
|
||||||
import Icon from 'react-native-vector-icons/Entypo'
|
import Icon from 'react-native-vector-icons/Entypo'
|
||||||
|
import Svg, { G } from 'react-native-svg'
|
||||||
import { secondaryColor, cycleDayColor, periodColor } from '../styles'
|
import { secondaryColor, cycleDayColor, periodColor } from '../styles'
|
||||||
import { home as labels, bleedingPrediction as predictLabels, shared } from './labels'
|
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 Drop from '../assets/home-drop'
|
||||||
import cycleModule from '../lib/cycle'
|
import cycleModule from '../lib/cycle'
|
||||||
import { getOrCreateCycleDay, getCycleDaysSortedByDate } from '../db'
|
import { getOrCreateCycleDay, getCycleDaysSortedByDate } from '../db'
|
||||||
@@ -74,7 +75,15 @@ export default class Home extends Component {
|
|||||||
style={styles.homeIconElement}
|
style={styles.homeIconElement}
|
||||||
>
|
>
|
||||||
<View position='absolute'>
|
<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>
|
||||||
<View style={[styles.homeIconTextWrapper, styles.wrapperCycle]}>
|
<View style={[styles.homeIconTextWrapper, styles.wrapperCycle]}>
|
||||||
<AppTextLight style={styles.iconText}>
|
<AppTextLight style={styles.iconText}>
|
||||||
|
|||||||
Reference in New Issue
Block a user