From 0219862a05d8329cf250f1f553269dfce1322b09 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 28 Jul 2023 09:13:16 +0100 Subject: [PATCH] Added no measure selected styling --- .../building-passport/RecommendationCard.tsx | 64 ++++++++++++------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/src/app/components/building-passport/RecommendationCard.tsx b/src/app/components/building-passport/RecommendationCard.tsx index 52f85759..851e83c4 100644 --- a/src/app/components/building-passport/RecommendationCard.tsx +++ b/src/app/components/building-passport/RecommendationCard.tsx @@ -163,6 +163,11 @@ export function RecommendationModal({ ); } +const selectionStyling = + "shadow active:shadow active:bg-brandmidblue w-full border rounded p-4 cursor-pointer text-gray-900 bg-gray-100 hover:bg-hoverblue hover:text-gray-100 transition-colors rounded-md flex flex-col justify-start"; +const noSelectionStyling = + "shadow active:shadow active:bg-brandmidblue w-full border rounded p-4 cursor-pointer text-gray-300 bg-white hover:bg-hoverblue hover:text-gray-100 transition-colors rounded-md flex flex-col justify-start"; + export default function RecommendationCard({ componentType, recommendationData, @@ -181,36 +186,51 @@ export default function RecommendationCard({ return (
{ setModalIsOpen(true); }} >

{componentType}

-
{cardComponent.description}
-
- Click for more options +
+ {cardComponent ? ( + cardComponent.description + ) : ( +
No measure selected
+ )}
- - - - - - - {cardComponent.newUValue && ( +
+ {cardComponent ? "Click for more options" : "Click to select"} +
+ {cardComponent ? ( +
Estimated Cost:{"£" + formatNumber(cardComponent.estimatedCost)}
+ - - + + - )} - {cardComponent.sapPoints && ( - - - - - )} - -
New U-Value:{cardComponent.newUValue}Estimated Cost: + {cardComponent + ? "£" + formatNumber(cardComponent.estimatedCost) + : ""} +
SAP Points:{cardComponent.sapPoints}
+ {cardComponent.newUValue && ( + + New U-Value: + {cardComponent.newUValue} + + )} + {cardComponent.sapPoints && ( + + SAP Points: + {cardComponent.sapPoints} + + )} + + + ) : ( + "" + )} +