Add extra colors to WeaponUnit

This commit is contained in:
Justin Edmund 2023-06-30 22:18:10 -07:00
parent 4f6925b824
commit e35879d03c
2 changed files with 24 additions and 4 deletions

View file

@ -70,7 +70,7 @@
bottom: 12%; bottom: 12%;
left: -3.5%; left: -3.5%;
& > .Skill { & > .skill {
width: 20%; width: 20%;
height: auto; height: auto;
} }
@ -78,6 +78,20 @@
} }
} }
&.extra {
&:hover .icon svg {
fill: var(--extra-purple-primary);
}
.image {
background: var(--extra-purple-card-bg);
.icon svg {
fill: var(--extra-purple-secondary);
}
}
}
&.filled h3 { &.filled h3 {
display: block; display: block;
} }
@ -103,7 +117,7 @@
.image { .image {
background: var(--card-bg); background: var(--card-bg);
border: 1px solid rgba(0, 0, 0, 0); border: 1px solid rgba(0, 0, 0, 0);
border-radius: $unit; border-radius: $item-corner;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -116,6 +130,10 @@
fill: var(--icon-secondary-hover); fill: var(--icon-secondary-hover);
} }
@include breakpoint(phone) {
border-radius: $item-corner-small;
}
.awakening { .awakening {
width: 100%; width: 100%;
height: 100%; height: 100%;

View file

@ -62,6 +62,7 @@ const WeaponUnit = ({
const classes = classNames({ const classes = classNames({
unit: true, unit: true,
[styles.unit]: true, [styles.unit]: true,
[styles.extra]: position >= 9,
[styles.mainhand]: unitType == 0, [styles.mainhand]: unitType == 0,
[styles.weapon]: unitType == 1, [styles.weapon]: unitType == 1,
[styles.editable]: editable, [styles.editable]: editable,
@ -506,8 +507,9 @@ const WeaponUnit = ({
<img <img
alt={weapon?.name[locale]} alt={weapon?.name[locale]}
className={classNames({ className={classNames({
GridImage: true, // TODO: Look into this gridImage class
Placeholder: imageUrl === '', [styles.gridImage]: true,
[styles.placeholder]: imageUrl === '',
})} })}
src={imageUrl !== '' ? imageUrl : placeholderImageUrl()} src={imageUrl !== '' ? imageUrl : placeholderImageUrl()}
/> />