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