mirror of
https://github.com/usememos/memos.git
synced 2025-02-28 23:39:04 +08:00
fix: heatmap popover blink (#195)
This commit is contained in:
parent
b884327a53
commit
987bb80770
2 changed files with 36 additions and 29 deletions
|
@ -99,19 +99,25 @@ const UsageHeatMap = () => {
|
||||||
: "stat-day-L4-bg";
|
: "stat-day-L4-bg";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span
|
<div
|
||||||
className={`stat-container ${colorLevel} ${currentStat === v ? "current" : ""} ${
|
className="stat-wrapper"
|
||||||
todayTimeStamp === v.timestamp ? "today" : ""
|
|
||||||
}`}
|
|
||||||
key={i}
|
key={i}
|
||||||
onMouseEnter={(e) => handleUsageStatItemMouseEnter(e, v)}
|
onMouseEnter={(e) => handleUsageStatItemMouseEnter(e, v)}
|
||||||
onMouseLeave={handleUsageStatItemMouseLeave}
|
onMouseLeave={handleUsageStatItemMouseLeave}
|
||||||
onClick={() => handleUsageStatItemClick(v)}
|
onClick={() => handleUsageStatItemClick(v)}
|
||||||
></span>
|
>
|
||||||
|
<span
|
||||||
|
className={`stat-container ${colorLevel} ${currentStat === v ? "current" : ""} ${
|
||||||
|
todayTimeStamp === v.timestamp ? "today" : ""
|
||||||
|
}`}
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{nullCell.map((_, i) => (
|
{nullCell.map((_, i) => (
|
||||||
<span className="stat-container null" key={i}></span>
|
<div className="stat-wrapper" key={i}>
|
||||||
|
<span className="stat-container null"></span>
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,35 +23,36 @@
|
||||||
grid-template-columns: repeat(12, 1fr);
|
grid-template-columns: repeat(12, 1fr);
|
||||||
grid-auto-flow: column;
|
grid-auto-flow: column;
|
||||||
|
|
||||||
> .stat-container {
|
> .stat-wrapper {
|
||||||
@apply block rounded-sm;
|
> .stat-container {
|
||||||
width: 14px;
|
@apply block rounded-sm;
|
||||||
height: 14px;
|
width: 14px;
|
||||||
background-color: @bg-lightgray;
|
height: 14px;
|
||||||
margin-bottom: 2px;
|
background-color: @bg-lightgray;
|
||||||
|
|
||||||
&.null {
|
&.null {
|
||||||
@apply bg-transparent;
|
@apply bg-transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.stat-day-L1-bg {
|
&.stat-day-L1-bg {
|
||||||
background-color: @stat-day-L1-bg !important;
|
background-color: @stat-day-L1-bg !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.stat-day-L2-bg {
|
&.stat-day-L2-bg {
|
||||||
background-color: @stat-day-L2-bg !important;
|
background-color: @stat-day-L2-bg !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.stat-day-L3-bg {
|
&.stat-day-L3-bg {
|
||||||
background-color: @stat-day-L3-bg !important;
|
background-color: @stat-day-L3-bg !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.stat-day-L4-bg {
|
&.stat-day-L4-bg {
|
||||||
background-color: @stat-day-L4-bg !important;
|
background-color: @stat-day-L4-bg !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.today {
|
&.today {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue