Skip to content
Snippets Groups Projects
Commit 80bf63ad authored by Julia Friesel's avatar Julia Friesel
Browse files

Display differing shades of red depending on bleeding value

parent 891b1d51
No related branches found
No related tags found
No related merge requests found
......@@ -37,9 +37,10 @@ export default class DatePickView extends Component {
}
function getBleedingDaysInCalFormat(bleedingDaysSortedByDate) {
const shadesOfRed = ['#ffbaba', '#ff7b7b', '#ff5252', '#ff0000']
return bleedingDaysSortedByDate.reduce((acc, day) => {
const dateString = day.date.toISOString().slice(0, 10)
acc[dateString] = { startingDay: true, endingDay: true, color: 'red' }
acc[dateString] = { startingDay: true, endingDay: true, color: shadesOfRed[day.bleeding.value] }
return acc
}, {})
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment