From 3878c7104e128a4b63fd389b5217ed6cebe7d1d4 Mon Sep 17 00:00:00 2001 From: Lukas Zenick Date: Sat, 17 Feb 2024 15:15:24 -0600 Subject: [PATCH 1/2] cal save buttons (no functionality) --- .../CalendarGrid/CalendarGrid.module.scss | 40 ++++++++++++++++++- .../common/CalendarGrid/CalendarGrid.tsx | 18 ++++++++- .../components/common/CalendarGrid/cal.svg | 8 ++++ .../components/common/CalendarGrid/png.svg | 8 ++++ 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 src/views/components/common/CalendarGrid/cal.svg create mode 100644 src/views/components/common/CalendarGrid/png.svg diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss index 7a6d8762..09ba5573 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss +++ b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss @@ -22,9 +22,10 @@ } .calendar { - // display: grid; - // grid-template-columns: auto repeat(5, 1fr); + display: flex; + flex-direction: column; gap: 10px; + position: relative; // Ensuring that child elements can be positioned in relation to this. } .day { @@ -89,3 +90,38 @@ line-height: normal; } } + +.buttonContainer { + display: flex; + align-items: center; + justify-content: flex-end; + gap: 10px; // Adjust the gap as needed + padding: 10px; + margin-top: auto; +} + +.calendarButton { + display: flex; + align-items: center; + gap: 5px; // Space between icon and text + padding: 6px 6px; + border: none; + background-color: transparent; + color: #333; // Adjust based on your design + cursor: pointer; + + &:hover { + background-color: rgba(0, 0, 0, 0.1); // Adjust hover effect as desired + } +} + +.buttonIcon { + height: 24px; // Adjust size as needed + fill: currentColor; +} + +.divider { + height: 30px; // Adjust height as needed + width: 1px; + background-color: grey; // Adjust color as needed +} \ No newline at end of file diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 0e478921..0583d7d3 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -5,6 +5,8 @@ import { CalendarGridCourse } from 'src/views/hooks/useFlattenedCourseSchedule'; import CalendarCourseCell from '../CalendarCourseCell/CalendarCourseCell'; import { Chip } from '../Chip/Chip'; import styles from './CalendarGrid.module.scss'; +import calIcon from './cal.svg'; +import pngIcon from './png.svg'; const daysOfWeek = Object.keys(DAY_MAP).filter(key => !['S', 'SU'].includes(key)); const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8); @@ -59,7 +61,7 @@ function CalendarGrid({ courseCells, saturdayClass }: React.PropsWithChildren row)} - {courseCells.map((Block: typeof CalendarCourseCell) => ( + {/* {courseCells.map((Block: typeof CalendarCourseCell) => (
- ))} + ))} */} +
+
{/* First divider */} + +
{/* Second divider */} + +
); } diff --git a/src/views/components/common/CalendarGrid/cal.svg b/src/views/components/common/CalendarGrid/cal.svg new file mode 100644 index 00000000..72bdf07f --- /dev/null +++ b/src/views/components/common/CalendarGrid/cal.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/views/components/common/CalendarGrid/png.svg b/src/views/components/common/CalendarGrid/png.svg new file mode 100644 index 00000000..40ba160b --- /dev/null +++ b/src/views/components/common/CalendarGrid/png.svg @@ -0,0 +1,8 @@ + + + + + + + + From 7132bcf572094db4bfbfa78dd84a620d91a7c781 Mon Sep 17 00:00:00 2001 From: Lukas Zenick Date: Sat, 17 Feb 2024 15:26:06 -0600 Subject: [PATCH 2/2] adjust location of svg files --- .../common/CalendarGrid => assets/icons}/cal.svg | 0 .../common/CalendarGrid => assets/icons}/png.svg | 0 .../common/CalendarGrid/CalendarGrid.module.scss | 14 +++++++------- .../common/CalendarGrid/CalendarGrid.tsx | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) rename src/{views/components/common/CalendarGrid => assets/icons}/cal.svg (100%) rename src/{views/components/common/CalendarGrid => assets/icons}/png.svg (100%) diff --git a/src/views/components/common/CalendarGrid/cal.svg b/src/assets/icons/cal.svg similarity index 100% rename from src/views/components/common/CalendarGrid/cal.svg rename to src/assets/icons/cal.svg diff --git a/src/views/components/common/CalendarGrid/png.svg b/src/assets/icons/png.svg similarity index 100% rename from src/views/components/common/CalendarGrid/png.svg rename to src/assets/icons/png.svg diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss index 09ba5573..961b505e 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.module.scss +++ b/src/views/components/common/CalendarGrid/CalendarGrid.module.scss @@ -95,7 +95,7 @@ display: flex; align-items: center; justify-content: flex-end; - gap: 10px; // Adjust the gap as needed + gap: 10px; padding: 10px; margin-top: auto; } @@ -103,25 +103,25 @@ .calendarButton { display: flex; align-items: center; - gap: 5px; // Space between icon and text + gap: 5px; padding: 6px 6px; border: none; background-color: transparent; - color: #333; // Adjust based on your design + color: #333; cursor: pointer; &:hover { - background-color: rgba(0, 0, 0, 0.1); // Adjust hover effect as desired + background-color: rgba(0, 0, 0, 0.1); } } .buttonIcon { - height: 24px; // Adjust size as needed + height: 24px; fill: currentColor; } .divider { - height: 30px; // Adjust height as needed + height: 30px; width: 1px; - background-color: grey; // Adjust color as needed + background-color: grey; } \ No newline at end of file diff --git a/src/views/components/common/CalendarGrid/CalendarGrid.tsx b/src/views/components/common/CalendarGrid/CalendarGrid.tsx index 0583d7d3..cd0c0e8c 100644 --- a/src/views/components/common/CalendarGrid/CalendarGrid.tsx +++ b/src/views/components/common/CalendarGrid/CalendarGrid.tsx @@ -5,8 +5,8 @@ import { CalendarGridCourse } from 'src/views/hooks/useFlattenedCourseSchedule'; import CalendarCourseCell from '../CalendarCourseCell/CalendarCourseCell'; import { Chip } from '../Chip/Chip'; import styles from './CalendarGrid.module.scss'; -import calIcon from './cal.svg'; -import pngIcon from './png.svg'; +import calIcon from 'src/assets/icons/cal.svg'; +import pngIcon from 'src/assets/icons/png.svg'; const daysOfWeek = Object.keys(DAY_MAP).filter(key => !['S', 'SU'].includes(key)); const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8);