From 3d1aa1affba4621d76dd8504006c2e08c8decff7 Mon Sep 17 00:00:00 2001 From: Mariana Sartorato Date: Wed, 17 Jul 2024 11:45:13 -0300 Subject: [PATCH] feat(#77): add neutral circle when no error or success --- dashboard/src/components/ColoredCircle/ColoredCircle.tsx | 6 +++++- dashboard/src/components/ListingItem/ListingItem.tsx | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dashboard/src/components/ColoredCircle/ColoredCircle.tsx b/dashboard/src/components/ColoredCircle/ColoredCircle.tsx index d17bbe8..286f473 100644 --- a/dashboard/src/components/ColoredCircle/ColoredCircle.tsx +++ b/dashboard/src/components/ColoredCircle/ColoredCircle.tsx @@ -14,7 +14,11 @@ const ColoredCircle = ({ className, }: IColoredCircle): JSX.Element => { const backgroundColor = - type === ItemType.Error ? 'bg-lightRed' : 'bg-lightGreen'; + type === ItemType.Error + ? 'bg-lightRed' + : type === ItemType.Success + ? 'bg-lightGreen' + : 'bg-mediumGray'; return (
); + const itemNeutral = + !errors || errors === 0 || !success || success === 0 ? ( + + ) : ( + <> + ); + const itemSuccess = success && success > 0 ? ( @@ -50,6 +58,7 @@ const ListingItem = ({ {itemError} {itemWarning} {itemSuccess} + {itemNeutral} {text}
);