Merge pull request #48 from CPSC319-Winter-term-2/mbalsdon-calendar-touchup

style the calendar
This commit is contained in:
Mathew Balsdon 2022-03-27 15:26:00 -07:00 committed by GitHub
commit 956dfde2ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 4 deletions

View File

@ -3,6 +3,7 @@ import moment from "moment";
import "react-big-calendar/lib/css/react-big-calendar.css"; import "react-big-calendar/lib/css/react-big-calendar.css";
import { import {
Box,
Divider, Divider,
FormControl, FormControl,
InputLabel, InputLabel,
@ -107,10 +108,17 @@ const CalendarPage: React.FC = () => {
}; };
return ( return (
<> <Box sx={{
display: "flex",
flexDirection: "column",
width: "98.5%",
height: "99.5%",
ml: 1,
mt: 1}}>
<Toolbar /> <Toolbar />
<FormControl variant="filled" fullWidth> <FormControl fullWidth>
<InputLabel id="calendar-user-select-label"> <InputLabel id="calendar-user-select-label">
<Typography color="black">User</Typography> <Typography color="black">User</Typography>
</InputLabel> </InputLabel>
@ -142,14 +150,20 @@ const CalendarPage: React.FC = () => {
<Calendar <Calendar
events={getUserMeetings(selectedUserUuid)} events={getUserMeetings(selectedUserUuid)}
views={["month", "week", "day"]} views={["month", "week", "day"]}
defaultView={Views.WEEK} defaultView={Views.MONTH}
onSelectEvent={handleSelectEvent} onSelectEvent={handleSelectEvent}
step={60} step={60}
showMultiDayTimes showMultiDayTimes
localizer={momentLocalizer(moment)} localizer={momentLocalizer(moment)}
style={{ height: "83%" }} style={{ height: "83%" }}
eventPropGetter = {() => {
const backgroundColor = "IndianRed";
const borderColor = "White";
return { style: { backgroundColor, borderColor } };
}}
/> />
</>
</Box>
); );
}; };

View File

@ -10,3 +10,7 @@ html,
body { body {
overflow: hidden; overflow: hidden;
} }
.rbc-calendar {
font-family: "Roboto","Helvetica","Arial",sans-serif;
}