From 57973c39ccd296fc458629a4e3a211bfa9710775 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 28 Feb 2022 18:22:10 -0800 Subject: [PATCH] Fix SummonResult Fix styles and add UncapIndicator --- components/SummonResult/index.scss | 91 +++++++++++++++++------------- components/SummonResult/index.tsx | 16 ++++-- 2 files changed, 64 insertions(+), 43 deletions(-) diff --git a/components/SummonResult/index.scss b/components/SummonResult/index.scss index d92d790f..edc2dcec 100644 --- a/components/SummonResult/index.scss +++ b/components/SummonResult/index.scss @@ -1,48 +1,63 @@ .SummonResult { - -webkit-font-smoothing: antialiased; - border-radius: 6px; display: flex; - font-family: -apple-system, "Helvetica Neue", "Lucida Grande"; - gap: 8px; - padding: 12px; -} + gap: $unit; + padding: $unit * 1.5; -.SummonResult img { - background: #e9e9e9; - border-radius: 6px; - display: inline-block; - height: auto; - width: 120px; -} + &:hover { + background: $grey-90; + cursor: pointer; + } -.SummonResult h5 { - color: #555; - display: inline-block; - font-size: $font-large; - font-weight: 500; - margin: 2px 4px 4px 0; -} + img { + background: $grey-80; + border-radius: 6px; + display: inline-block; + height: auto; + width: 120px; + } -.SummonResult .WeaponLabelIcon { - margin-right: 4px; -} + .Info { + display: flex; + flex-direction: column; + flex-grow: 1; + gap: $unit / 2; -.SummonResult .stars { - display: inline-block; - color: #FFA15E; - font-size: $font-xlarge; -} + h5 { + color: #555; + display: inline-block; + font-size: $font-medium; + font-weight: $medium; + } -.SummonResult .stars > span { - color: #65DAFF; -} + .UncapIndicator { + justify-content: left; + pointer-events: none; + } -.SummonResult:hover { - background: #e9e9e9; - cursor: pointer; -} + .stars { + display: inline-block; + color: #FFA15E; + font-size: $font-xlarge; -.SummonResult:hover .image_placeholder { - background: #dadada; -} \ No newline at end of file + & > span { + 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); + } + } + } +} diff --git a/components/SummonResult/index.tsx b/components/SummonResult/index.tsx index 23575fac..2df04f44 100644 --- a/components/SummonResult/index.tsx +++ b/components/SummonResult/index.tsx @@ -1,4 +1,5 @@ import React from 'react' +import UncapIndicator from '~components/UncapIndicator' import WeaponLabelIcon from '~components/WeaponLabelIcon' import './index.scss' @@ -17,12 +18,17 @@ class SummonResult extends React.Component { return (
  • {summon.name.en} -
    -
    -
    {summon.name.en}
    -
    ⭑⭑⭑{(summon.uncap.flb) ? : ''}{(summon.uncap.ulb) ? : ''}
    +
    +
    {summon.name.en}
    + +
    +
    -
  • )