diff --git a/src/components/BellSchedule.js b/src/components/BellSchedule.js index 7eba796..543a366 100644 --- a/src/components/BellSchedule.js +++ b/src/components/BellSchedule.js @@ -1,5 +1,3 @@ -// @flow - import React from 'react'; import './BellSchedule.css'; @@ -49,6 +47,16 @@ const BellSchedule = ({ scheduleName, date }: Props) => { + // choosing the background color based on schedule (A, B, C, or irregular) + const backgroundColorBellSchedule = + scheduleName.split(' ')[1] === 'A' + ? '#8DE3FF' + : scheduleName.split(' ')[1] === 'B' + ? '#E0DBFF' + : scheduleName.split(' ')[1] === 'C' ? '#ffddf4' : '#ff8088'; + const bellBackground = { + backgroundColor: backgroundColorBellSchedule + }; return (