Skip to content

Commit cab259d

Browse files
committed
Previous & next date styles should be consistent
Passes the same style function as current. Styles are identical except color. Allows strike-through to be correctly applied
1 parent 23c955f commit cab259d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/Calendar/Days.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ const Days: React.FC<Props> = ({
209209
return cn(
210210
baseClass,
211211
!activeDateData(day).active ? hoverClassByDay(day) : activeDateData(day).className,
212-
isDateDisabled(day, type) && "line-through"
212+
isDateDisabled(day, type) && "line-through",
213+
(type == "previous" || type == "next") && "text-gray-400"
213214
);
214215
},
215216
[activeDateData, hoverClassByDay, isDateDisabled]
@@ -345,7 +346,7 @@ const Days: React.FC<Props> = ({
345346
type="button"
346347
key={index}
347348
disabled={isDateDisabled(item, "previous")}
348-
className="flex items-center justify-center text-gray-400 h-12 w-12 lg:w-10 lg:h-10"
349+
className={`${buttonClass(item, "previous")}`}
349350
onClick={() => handleClickDay(item, "previous")}
350351
onMouseOver={() => {
351352
hoverDay(item, "previous");
@@ -375,7 +376,7 @@ const Days: React.FC<Props> = ({
375376
type="button"
376377
key={index}
377378
disabled={isDateDisabled(item, "next")}
378-
className="flex items-center justify-center text-gray-400 h-12 w-12 lg:w-10 lg:h-10"
379+
className={`${buttonClass(item, "next")}`}
379380
onClick={() => handleClickDay(item, "next")}
380381
onMouseOver={() => {
381382
hoverDay(item, "next");

0 commit comments

Comments
 (0)