From 9ab86cfab1142a49802551369258d412bcac863d Mon Sep 17 00:00:00 2001 From: Derek Chen Date: Mon, 5 Feb 2024 21:38:34 -0600 Subject: [PATCH] Off center now --- .../CalendarGrid/CalendarGrid.module.scss | 9 ++++++++ .../common/CalendarGrid/CalendarGrid.tsx | 23 ++++++++----------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss index 1a43c4d4..3c16ce7a 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss +++ b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss @@ -13,6 +13,15 @@ flex: 1 0 0; } +.calendarGrid { + display: flex; + flex-direction: column; +} + +.calendarRow { + display: flex; +} + .calendar { display: grid; grid-template-columns: auto repeat(5, 1fr); diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 9c7bd140..d3992f64 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -27,22 +27,17 @@ const Calendar: React.FC = (props) => { {/* Displaying the rest of the calendar */} - {hoursOfDay.map((hour) => ( -
- {/* Hour column */} -
- {hour}:00 +
+ {hoursOfDay.map(hour => ( +
+ {daysOfWeek.map(day => ( + + ))}
- {/* Calendar cells for each day */} - {daysOfWeek.map((day, dayIndex) => ( -
- -
- ))} -
- ))} + ))} +
- ); + ) }; export default Calendar; \ No newline at end of file