Skip to content

Commit

Permalink
Previous & next date styles should be consistent
Browse files Browse the repository at this point in the history
Passes the same style function as current. Styles are identical except color. Allows strike-through to be correctly applied
  • Loading branch information
AnalogMemory committed May 23, 2023
1 parent 23c955f commit cab259d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/Calendar/Days.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ const Days: React.FC<Props> = ({
return cn(
baseClass,
!activeDateData(day).active ? hoverClassByDay(day) : activeDateData(day).className,
isDateDisabled(day, type) && "line-through"
isDateDisabled(day, type) && "line-through",
(type == "previous" || type == "next") && "text-gray-400"
);
},
[activeDateData, hoverClassByDay, isDateDisabled]
Expand Down Expand Up @@ -345,7 +346,7 @@ const Days: React.FC<Props> = ({
type="button"
key={index}
disabled={isDateDisabled(item, "previous")}
className="flex items-center justify-center text-gray-400 h-12 w-12 lg:w-10 lg:h-10"
className={`${buttonClass(item, "previous")}`}
onClick={() => handleClickDay(item, "previous")}
onMouseOver={() => {
hoverDay(item, "previous");
Expand Down Expand Up @@ -375,7 +376,7 @@ const Days: React.FC<Props> = ({
type="button"
key={index}
disabled={isDateDisabled(item, "next")}
className="flex items-center justify-center text-gray-400 h-12 w-12 lg:w-10 lg:h-10"
className={`${buttonClass(item, "next")}`}
onClick={() => handleClickDay(item, "next")}
onMouseOver={() => {
hoverDay(item, "next");
Expand Down

0 comments on commit cab259d

Please sign in to comment.