From 7e2f5eaed7d782bc886545f7241e0891d55cfae0 Mon Sep 17 00:00:00 2001 From: doprz <52579214+doprz@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:39:53 -0600 Subject: [PATCH] feat: migrate styles to TailwindCSS --- .../CalendarGrid/CalendarGrid.module.scss | 4 --- .../common/CalendarGrid/CalendarGrid.tsx | 30 +++++++++---------- .../CalendarGridCell/CalendarGridCell.tsx | 7 ++--- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss index 95f7e009..c40bafc2 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss +++ b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss @@ -1,6 +1,3 @@ -@use 'sass:color'; -@use 'src/views/styles/colors.module.scss'; - .dayLabelContainer { display: flex; flex-direction: row; @@ -32,7 +29,6 @@ .day { gap: 5px; - color: colors.$burnt_orange; text-align: center; font-size: 14.22px; font-style: normal; diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 01bff8d3..817ab0a6 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import styles from './CalendarGrid.module.scss'; import CalendarCell from '../CalendarGridCell/CalendarGridCell'; import { DAY_MAP } from 'src/shared/types/CourseMeeting'; @@ -9,11 +8,12 @@ const grid = []; for (let i = 0; i < 13; i++) { const row = []; let hour = hoursOfDay[i]; - row.push(<> -
-

{(hour % 12 === 0 ? 12 : hour % 12) + (hour < 12 ? ' AM' : ' PM')}

+ row.push( +
+
+

{(hour % 12 === 0 ? 12 : hour % 12) + (hour < 12 ? ' AM' : ' PM')}

+
- ); row.push(Array.from({ length: 5 }, (_, j) => )); grid.push(row); @@ -25,26 +25,26 @@ for (let i = 0; i < 13; i++) { */ const Calendar: React.FC = (props) => { return ( -
-
+
+
{/* Displaying the rest of the calendar */} -
- {/*
-
+
+ {/*
+
{hoursOfDay.map((hour) => ( -
-
+
+

{hour % 12 === 0 ? 12 : hour % 12} {hour < 12 ? 'AM' : 'PM'}

))}
*/} -
+
{/* Displaying day labels */} -
+
{daysOfWeek.map(day => ( -
+
{day}
))} diff --git a/src/views/components/common/CalendarGridCell/CalendarGridCell.tsx b/src/views/components/common/CalendarGridCell/CalendarGridCell.tsx index fa96687c..5cab19b0 100644 --- a/src/views/components/common/CalendarGridCell/CalendarGridCell.tsx +++ b/src/views/components/common/CalendarGridCell/CalendarGridCell.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import styles from './CalendarGridCell.module.scss'; /** * Component representing each 1 hour time block of a calendar @@ -7,10 +6,8 @@ import styles from './CalendarGridCell.module.scss'; */ const CalendarCell: React.FC = (props) => { return ( -
-
- -
+
+
); };