Small style adjustments
This commit is contained in:
@@ -4,13 +4,13 @@ import { Serialized } from 'chrome-extension-toolkit';
|
|||||||
* a map of the days of the week that a class is taught, and the corresponding abbreviation
|
* a map of the days of the week that a class is taught, and the corresponding abbreviation
|
||||||
*/
|
*/
|
||||||
export const DAY_MAP = {
|
export const DAY_MAP = {
|
||||||
M: 'Monday',
|
MON: 'Monday',
|
||||||
T: 'Tuesday',
|
TUE: 'Tuesday',
|
||||||
W: 'Wednesday',
|
WED: 'Wednesday',
|
||||||
TH: 'Thursday',
|
THU: 'Thursday',
|
||||||
F: 'Friday',
|
FRI: 'Friday',
|
||||||
S: 'Saturday',
|
SAT: 'Saturday',
|
||||||
SU: 'Sunday',
|
SUN: 'Sunday',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
/** A day of the week that a class is taught */
|
/** A day of the week that a class is taught */
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export const Default: Story = {
|
|||||||
schedule: new CourseSchedule({
|
schedule: new CourseSchedule({
|
||||||
meetings: [
|
meetings: [
|
||||||
new CourseMeeting({
|
new CourseMeeting({
|
||||||
days: [DAY_MAP.M, DAY_MAP.W, DAY_MAP.F],
|
days: [DAY_MAP.MON, DAY_MAP.WED, DAY_MAP.FRI],
|
||||||
startTime: 480,
|
startTime: 480,
|
||||||
endTime: 570,
|
endTime: 570,
|
||||||
location: {
|
location: {
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeAndGrid {
|
.timeAndGrid {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import styles from './CalendarGrid.module.scss';
|
|||||||
import CalendarCell from '../CalendarGridCell/CalendarGridCell';
|
import CalendarCell from '../CalendarGridCell/CalendarGridCell';
|
||||||
import { DAY_MAP } from 'src/shared/types/CourseMeeting';
|
import { DAY_MAP } from 'src/shared/types/CourseMeeting';
|
||||||
|
|
||||||
const daysOfWeek = Object.values(DAY_MAP).filter(d => d != "Saturday" && d != "Sunday")
|
const daysOfWeek = Object.keys(DAY_MAP).filter(key => !['SAT', 'SUN'].includes(key));
|
||||||
const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8);
|
const hoursOfDay = Array.from({ length: 14 }, (_, index) => index + 8);
|
||||||
const grid = Array.from({ length: 5 }, () =>
|
const grid = Array.from({ length: 5 }, () =>
|
||||||
Array.from({ length: 13 }, (_, columnIndex) => (
|
Array.from({ length: 13 }, (_, columnIndex) => (
|
||||||
@@ -30,7 +30,7 @@ const Calendar: React.FC = (props) => {
|
|||||||
{hoursOfDay.map((hour) => (
|
{hoursOfDay.map((hour) => (
|
||||||
<div key={hour} className={styles.timeBlock}>
|
<div key={hour} className={styles.timeBlock}>
|
||||||
<div className={styles.timeLabelContainer}>
|
<div className={styles.timeLabelContainer}>
|
||||||
<p>{hour % 12 === 0 ? 12 : hour % 12}:00 {hour < 12 ? 'AM' : 'PM'}</p>
|
<p>{hour % 12 === 0 ? 12 : hour % 12} {hour < 12 ? 'AM' : 'PM'}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.calendarCell {
|
.calendarCell {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 165px;
|
width: 213.8px;
|
||||||
height: 52.231px;
|
height: 44.769px;
|
||||||
min-width: 45px;
|
min-width: 45px;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hourLine {
|
.hourLine {
|
||||||
width: 165px;
|
width: 213.8px;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
border-radius: var(--border-radius-none, 0px);
|
border-radius: var(--border-radius-none, 0px);
|
||||||
background: rgba(218, 220, 224, 0.25);
|
background: rgba(218, 220, 224, 0.25);
|
||||||
|
|||||||
Reference in New Issue
Block a user