Skip to content

Commit

Permalink
feat: add timeAndGrid div
Browse files Browse the repository at this point in the history
  • Loading branch information
DereC4 authored and doprz committed Mar 6, 2024
1 parent 9d68211 commit 95e0544
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
line-height: normal;
}

.timeAndGrid {
display: flex;
}

.timeColumn {
display: flex;
min-height: 573px;
Expand Down
25 changes: 13 additions & 12 deletions src/views/components/common/CalendarGrid/CalendarGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ const Calendar: React.FC = (props) => {
))}
</div>
{/* Displaying the rest of the calendar */}
<div className={styles.timeColumn}>
{hoursOfDay.map((hour) => (
<div key={hour} className={styles.timeLabelContainer}>
<span>{hour % 12 === 0 ? 12 : hour % 12}:00 {hour < 12 ? 'AM' : 'PM'}</span>
</div>
))}
<div className={styles.timeAndGrid}>
<div className={styles.timeColumn}>
{hoursOfDay.map((hour) => (
<div key={hour} className={styles.timeLabelContainer}>
<span>{hour % 12 === 0 ? 12 : hour % 12}:00 {hour < 12 ? 'AM' : 'PM'}</span>
</div>
))}
</div>
<div className={styles.calendarGrid}>
{grid.map((row, rowIndex) => (
row
))}
</div>
</div>
<div className={styles.calendarGrid}>
{grid.map((row, rowIndex) => (
row
))}
</div>

</div>
)
};
Expand Down

0 comments on commit 95e0544

Please sign in to comment.