Skip to content

Commit

Permalink
style(streak): Disable clicking on specific date.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZL-Asica committed Nov 8, 2024
1 parent 0c44e52 commit 0416c5b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
2 changes: 2 additions & 0 deletions src/pages/Streak.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ const Streak = () => {

<Box sx={{ display: 'flex', justifyContent: 'center', mt: 3 }}>
<Calendar
tileDisabled={() => true}
tileContent={({ date, view }) =>
view === 'month' ? getTileIcon(date) : null
}
className='custom-calendar'
/>
</Box>
</Box>
Expand Down
49 changes: 27 additions & 22 deletions src/styles/StreakPage.css
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
/* Ensure all calendar dates have the color black */
/* Ensure all calendar dates have a consistent black color, including weekends */
.react-calendar__month-view__days__day--weekend {
color: black !important; /* Override weekend color */
}
color: black !important; /* Override the weekend default color */
}

/* Custom weekday headers */
/* Style weekday headers with bold, capitalized, and black text */
.react-calendar__month-view__weekdays__weekday {
text-transform: capitalize;
font-weight: bold;
color: black;
font-size: 0.8rem;
text-transform: capitalize;
font-weight: bold;
color: black;
font-size: 0.8rem;
}

/* Larger navigation arrows */
/* Enlarge navigation arrows for better visibility */
.react-calendar__navigation button {
font-size: 1rem;
color: black;
font-size: 1rem;
color: black;
}

/* Animation for FireIcon */
@keyframes burn-animation {

0%,
100% {
transform: scale(1);
}
/* Remove the default background color */
button.react-calendar__tile.react-calendar__month-view__days__day {
color: inherit;
background-color: #fff;
pointer-events: none;
}

50% {
transform: scale(1.2);
}
}
/* Animation for FireIcon, creating a pulsing "burn" effect */
@keyframes burn-animation {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
}

0 comments on commit 0416c5b

Please sign in to comment.