Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/components/BellSchedule.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @flow

import React from 'react';

import './BellSchedule.css';
Expand Down Expand Up @@ -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 (
<div className="bell-schedule">
<Paper>
Expand All @@ -62,7 +70,11 @@ const BellSchedule = ({
>
<div>
{scheduleName !== 'none' && (
<Typography type="title" className="bell-schedule-name">
<Typography
type="title"
className="bell-schedule-name"
style={bellBackground}
>
<div
style={{
display: 'flex',
Expand Down