highlight due date
This commit is contained in:
@@ -35,9 +35,11 @@ export default function Flatastic() {
|
|||||||
className = "irregular";
|
className = "irregular";
|
||||||
} else {
|
} else {
|
||||||
className = chore.timeLeftNext <= 0 ? "due" : "notDue";
|
className = chore.timeLeftNext <= 0 ? "due" : "notDue";
|
||||||
timeLeftInDays = Math.abs(
|
timeLeftInDays = <span className={style.timeLeft}>
|
||||||
Math.floor(chore.timeLeftNext / (60 * 60 * 24)),
|
{Math.abs(
|
||||||
);
|
Math.floor(chore.timeLeftNext / (60 * 60 * 24)),
|
||||||
|
)}d
|
||||||
|
</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -30,5 +30,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.notDue {
|
.notDue {
|
||||||
background-color: #ccffcc;
|
background-color: #a6cfa6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeLeft {
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user