Fix SummonResult
Fix styles and add UncapIndicator
This commit is contained in:
parent
44a92ef1aa
commit
57973c39cc
2 changed files with 64 additions and 43 deletions
|
|
@ -1,48 +1,63 @@
|
||||||
.SummonResult {
|
.SummonResult {
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-family: -apple-system, "Helvetica Neue", "Lucida Grande";
|
gap: $unit;
|
||||||
gap: 8px;
|
padding: $unit * 1.5;
|
||||||
padding: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SummonResult img {
|
&:hover {
|
||||||
background: #e9e9e9;
|
background: $grey-90;
|
||||||
border-radius: 6px;
|
cursor: pointer;
|
||||||
display: inline-block;
|
}
|
||||||
height: auto;
|
|
||||||
width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SummonResult h5 {
|
img {
|
||||||
color: #555;
|
background: $grey-80;
|
||||||
display: inline-block;
|
border-radius: 6px;
|
||||||
font-size: $font-large;
|
display: inline-block;
|
||||||
font-weight: 500;
|
height: auto;
|
||||||
margin: 2px 4px 4px 0;
|
width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.SummonResult .WeaponLabelIcon {
|
.Info {
|
||||||
margin-right: 4px;
|
display: flex;
|
||||||
}
|
flex-direction: column;
|
||||||
|
flex-grow: 1;
|
||||||
|
gap: $unit / 2;
|
||||||
|
|
||||||
.SummonResult .stars {
|
h5 {
|
||||||
display: inline-block;
|
color: #555;
|
||||||
color: #FFA15E;
|
display: inline-block;
|
||||||
font-size: $font-xlarge;
|
font-size: $font-medium;
|
||||||
}
|
font-weight: $medium;
|
||||||
|
}
|
||||||
|
|
||||||
.SummonResult .stars > span {
|
.UncapIndicator {
|
||||||
color: #65DAFF;
|
justify-content: left;
|
||||||
}
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.SummonResult:hover {
|
.stars {
|
||||||
background: #e9e9e9;
|
display: inline-block;
|
||||||
cursor: pointer;
|
color: #FFA15E;
|
||||||
}
|
font-size: $font-xlarge;
|
||||||
|
|
||||||
.SummonResult:hover .image_placeholder {
|
& > span {
|
||||||
background: #dadada;
|
color: #65DAFF;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: $unit / 2;
|
||||||
|
|
||||||
|
.WeaponLabelIcon {
|
||||||
|
$aspect-ratio: calc(25 / 60);
|
||||||
|
$height: 22px;
|
||||||
|
background-size: calc($height / $aspect-ratio) $height;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
height: $height;
|
||||||
|
width: calc($height/ $aspect-ratio);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import UncapIndicator from '~components/UncapIndicator'
|
||||||
import WeaponLabelIcon from '~components/WeaponLabelIcon'
|
import WeaponLabelIcon from '~components/WeaponLabelIcon'
|
||||||
|
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
|
|
@ -17,12 +18,17 @@ class SummonResult extends React.Component<Props> {
|
||||||
return (
|
return (
|
||||||
<li className="SummonResult" onClick={this.props.onClick}>
|
<li className="SummonResult" onClick={this.props.onClick}>
|
||||||
<img alt={summon.name.en} src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}.jpg`} />
|
<img alt={summon.name.en} src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}.jpg`} />
|
||||||
<div>
|
<div className="Info">
|
||||||
<div>
|
<h5>{summon.name.en}</h5>
|
||||||
<h5>{summon.name.en}</h5>
|
<UncapIndicator
|
||||||
<div className="stars">⭑⭑⭑{(summon.uncap.flb) ? <span>⭑</span> : ''}{(summon.uncap.ulb) ? <span>⭑</span> : ''}</div>
|
type="summon"
|
||||||
|
flb={summon.uncap.flb}
|
||||||
|
ulb={summon.uncap.ulb}
|
||||||
|
special={false}
|
||||||
|
/>
|
||||||
|
<div className="tags">
|
||||||
|
<WeaponLabelIcon labelType={Element[summon.element]} />
|
||||||
</div>
|
</div>
|
||||||
<WeaponLabelIcon labelType={Element[summon.element]} />
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue