Highlight spec on spec equip click

This commit is contained in:
Mashy 2019-05-14 11:18:19 +10:00
parent e56f170132
commit 2318ff3974
2 changed files with 20 additions and 2 deletions

View File

@ -379,6 +379,23 @@ button.equip {
text-align: center; text-align: center;
} }
.equip-spec {
animation: equip-spec 1s infinite ease-in-out alternate;
}
@keyframes equip-spec {
0% {
color: #333;
stroke: #333;
}
100% {
color: #7a7a7a;
stroke: #7a7a7a;
}
}
.instance-equip .specs figcaption { .instance-equip .specs figcaption {
font-size: 75%; font-size: 75%;

View File

@ -108,9 +108,10 @@ function Cryp(props) {
} }
if (!s) { if (!s) {
const equip = specList.includes(vbox.bound[activeVar]) ? 'equip-spec' : 'gray';
return ( return (
<figure key={i} className="gray" onClick={blankSpecClick}> <figure key={i} onClick={blankSpecClick}>
{shapes.diamond('stat-icon gray')} {shapes.diamond(`stat-icon ${equip}`)}
<figcaption>&nbsp;</figcaption> <figcaption>&nbsp;</figcaption>
</figure> </figure>
); );