Off center now

This commit is contained in:
2024-02-05 21:38:34 -06:00
parent 01a3918502
commit 9ab86cfab1
2 changed files with 18 additions and 14 deletions

View File

@@ -13,6 +13,15 @@
flex: 1 0 0; flex: 1 0 0;
} }
.calendarGrid {
display: flex;
flex-direction: column;
}
.calendarRow {
display: flex;
}
.calendar { .calendar {
display: grid; display: grid;
grid-template-columns: auto repeat(5, 1fr); grid-template-columns: auto repeat(5, 1fr);

View File

@@ -27,22 +27,17 @@ const Calendar: React.FC = (props) => {
</div> </div>
{/* Displaying the rest of the calendar */} {/* Displaying the rest of the calendar */}
{hoursOfDay.map((hour) => ( <div className={styles.calendarGrid}>
<div key={hour} className={styles.row}> {hoursOfDay.map(hour => (
{/* Hour column */} <div key={hour} className={styles.calendarRow}>
<div className={styles.timeLabelContainer}> {daysOfWeek.map(day => (
<span>{hour}:00</span> <CalendarCell key={`${day}-${hour}`} />
))}
</div> </div>
{/* Calendar cells for each day */} ))}
{daysOfWeek.map((day, dayIndex) => ( </div>
<div key={`${day}-${hour}`} className={styles.timeBlock}>
<CalendarCell />
</div>
))}
</div>
))}
</div> </div>
); )
}; };
export default Calendar; export default Calendar;