Merge branch 'Adjust-font-colors-of-marked-days-in-calendar' into 'rebased-redesign'

Change font color of marked calendar days

See merge request bloodyhealth/drip!323
This commit is contained in:
Sofiya Tepikin
2020-12-30 15:07:03 +00:00
9 changed files with 47 additions and 49 deletions
+18 -17
View File
@@ -12,11 +12,13 @@ export const toCalFormat = (bleedingDaysSortedByDate) => {
customStyles: {
container: {
backgroundColor: shades[day.bleeding.value],
}
}
}
if (day.date === todayDateString) {
acc[day.date].customStyles.text = styles.calendarToday
paddingTop: 2,
},
text: {
color: Colors.turquoiseLight,
...(day.date === todayDateString && styles.calendarToday),
},
},
}
return acc
}, {})
@@ -31,12 +33,11 @@ export const predictionToCalFormat = (predictedDays) => {
accSet[day] = {
customStyles: {
container: {
borderColor: (i === middleIndex) ? shades[3] : shades[0],
borderStyle: (i === middleIndex) ? 'solid' : 'dashed',
borderColor: i === middleIndex ? shades[3] : shades[0],
borderStyle: i === middleIndex ? 'solid' : 'dashed',
borderWidth: 1,
},
}
},
}
if (day === todayDateString) {
accSet[day].customStyles.text = styles.calendarToday
@@ -50,24 +51,24 @@ export const predictionToCalFormat = (predictedDays) => {
export const todayToCalFormat = () => {
const todayDateString = LocalDate.now().toString()
const todayFormated = {}
todayFormated[todayDateString] = {
customStyles: {
text: styles.calendarToday
}
return {
[todayDateString]: {
customStyles: {
text: styles.calendarToday,
},
},
}
return todayFormated
}
const styles = {
calendarToday: {
fontFamily: Fonts.bold,
color: Colors.purple
color: Colors.purple,
},
}
export const calendarTheme = {
calendarBackground: Colors.tourquiseLight,
calendarBackground: Colors.turquoiseLight,
dayTextColor: Colors.greyDark,
monthTextColor: Colors.purple,
textDayFontFamily: Fonts.main,