From 3ffd5ab0ee8ffa63199d1428e37206f9b59fb7a5 Mon Sep 17 00:00:00 2001 From: sct Date: Wed, 3 Feb 2021 07:56:26 +0000 Subject: [PATCH] fix(ui): when PersonCard has no profilePath, correctly position name/role content --- src/components/PersonCard/index.tsx | 39 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/components/PersonCard/index.tsx b/src/components/PersonCard/index.tsx index ce4469202..f01756878 100644 --- a/src/components/PersonCard/index.tsx +++ b/src/components/PersonCard/index.tsx @@ -38,34 +38,33 @@ const PersonCard: React.FC = ({ className={`relative ${ canExpand ? 'w-full' : 'w-36 sm:w-36 md:w-44' } rounded-lg text-white shadow-lg transition ease-in-out duration-150 cursor-pointer transform-gpu ${ - isHovered ? 'bg-gray-500 scale-105' : 'bg-gray-600 scale-100' + isHovered ? 'bg-gray-600 scale-105' : 'bg-gray-700 scale-100' }`} >
- {profilePath && ( -
+
+ {profilePath ? ( -
- )} - {!profilePath && ( - - - - )} + ) : ( + + + + )} +
{name}
{subName && (
= ({ {subName}
)} -
+