From 321140a08ad3e0245f5f0bef657bebc7cfc747ef Mon Sep 17 00:00:00 2001 From: Aminejv Date: Mon, 9 Aug 2021 09:59:20 +0100 Subject: [PATCH] feat(CollectionPreview): display popup when only hovering over title and description --- .../core/CollectionPreviewBlock/index.js | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/components/core/CollectionPreviewBlock/index.js b/components/core/CollectionPreviewBlock/index.js index 5b7c01ac..71f885c3 100644 --- a/components/core/CollectionPreviewBlock/index.js +++ b/components/core/CollectionPreviewBlock/index.js @@ -120,31 +120,31 @@ export default function CollectionPreview({ collection, viewer, owner, onAction - +
{title}
-
- - {description} - -
+ {description && ( +
+ + {description} + +
+ )}
{title} @@ -283,10 +283,11 @@ const useAnimateDescription = ({ useMounted(() => { if (isDescriptionVisible) { - descriptionControls.start({ opacity: 1, transition: { delay: 0.2 } }); + descriptionControls.start({ visibility: "initial", opacity: 1, transition: { delay: 0.2 } }); return; } - descriptionControls.set({ opacity: 0 }); + + descriptionControls.set({ opacity: 0, visibility: "hidden" }); }, [isDescriptionVisible]); return { containerVariants, descriptionControls };