diff --git a/src/stories/components/CalendarGrid.stories.tsx b/src/stories/components/CalendarGrid.stories.tsx index 6d8861b9f..db63e5b69 100644 --- a/src/stories/components/CalendarGrid.stories.tsx +++ b/src/stories/components/CalendarGrid.stories.tsx @@ -4,16 +4,16 @@ import Calendar from '@views/components/common/CalendarGrid/CalendarGrid'; import type { Meta, StoryObj } from '@storybook/react'; const meta = { - title: 'Components/Common/Calendar', - component: Calendar, - parameters: { - // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout - layout: 'centered', - tags: ['autodocs'], - } + title: 'Components/Common/Calendar', + component: Calendar, + parameters: { + // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout + layout: 'centered', + tags: ['autodocs'], + }, } satisfies Meta; export default meta; type Story = StoryObj; -export const Default: Story = {}; \ No newline at end of file +export const Default: Story = {}; diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss index 5e0318cd2..c0212d036 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss +++ b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss @@ -27,14 +27,8 @@ display: flex; } -.timeColumn { - display: flex; - min-height: 573px; - flex-direction: column; - justify-content: space-between; - align-items: flex-start; - flex: 1 0 0; - border-radius: var(--border-radius-none, 0px); +.day { + gap: 5px; } .timeBlock { diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 12bf1cb5c..c81fe8f06 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -1,8 +1,9 @@ import React from 'react'; import styles from './CalendarGrid.module.scss'; import CalendarCell from '../CalendarGridCell/CalendarGridCell'; +import { DAY_MAP } from 'src/shared/types/CourseMeeting'; -const daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']; +const daysOfWeek = Object.values(DAY_MAP); const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); const grid = Array.from({ length: 5 }, () => Array.from({ length: 13 }, (_, columnIndex) => ) @@ -14,7 +15,10 @@ const grid = Array.from({ length: 5 }, () => */ const Calendar: React.FC = props => { return ( -
+
+
+ {daysOfWeek.map((day, dayIndex) => ( +
{/* Empty cell in the top-left corner */}