From 60bb53a5de79bbf94c46aedf22c3963b2407d21d Mon Sep 17 00:00:00 2001 From: Prayag Prajapati Date: Wed, 13 Sep 2023 23:53:53 +0530 Subject: [PATCH] Add logo to ItemHero #160 --- src/components/layouts/item/hero.jsx | 16 +++++++++++++++- src/components/layouts/item/hero.module.scss | 9 +++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/components/layouts/item/hero.jsx b/src/components/layouts/item/hero.jsx index 58dcb76..386ca56 100644 --- a/src/components/layouts/item/hero.jsx +++ b/src/components/layouts/item/hero.jsx @@ -184,7 +184,21 @@ const Hero = ({ }} > - {item.Name} + {!!item.ImageBlurHashes.Logo ? ( + { + e.target.style.opacity = 1; + }} + /> + ) : ( + item.Name + )} {!disableInfoStrip && ( diff --git a/src/components/layouts/item/hero.module.scss b/src/components/layouts/item/hero.module.scss index 1304cfc..71b60a6 100644 --- a/src/components/layouts/item/hero.module.scss +++ b/src/components/layouts/item/hero.module.scss @@ -53,4 +53,13 @@ $maskPercentage: 40%; width: 100%; grid-template-columns: 1fr 85%; } + + &-name-logo { + width: 8.3em; + height: 2.3em; + object-fit: contain; + object-position: left; + opacity: 0; + transition: opacity $transition-time-fast; + } }