Unverified Commit 987bb807 authored by winwin2011's avatar winwin2011 Committed by GitHub

fix: heatmap popover blink (#195)

parent b884327a
...@@ -99,19 +99,25 @@ const UsageHeatMap = () => { ...@@ -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
className={`stat-container ${colorLevel} ${currentStat === v ? "current" : ""} ${
todayTimeStamp === v.timestamp ? "today" : ""
}`}
></span> ></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,12 +23,12 @@ ...@@ -23,12 +23,12 @@
grid-template-columns: repeat(12, 1fr); grid-template-columns: repeat(12, 1fr);
grid-auto-flow: column; grid-auto-flow: column;
> .stat-wrapper {
> .stat-container { > .stat-container {
@apply block rounded-sm; @apply block rounded-sm;
width: 14px; width: 14px;
height: 14px; height: 14px;
background-color: @bg-lightgray; background-color: @bg-lightgray;
margin-bottom: 2px;
&.null { &.null {
@apply bg-transparent; @apply bg-transparent;
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
} }
} }
} }
}
} }
.usage-detail-container { .usage-detail-container {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment