From fd0417f3e38aa1fa7f5ac2dfc7abbb5914202118 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 9 Sep 2024 16:42:21 +0100 Subject: [PATCH] styling energy assessment page --- src/app/components/Buttons.tsx | 15 +- src/app/components/StatusBadge.tsx | 6 +- .../components/building-passport/EpcCard.tsx | 21 ++- src/app/db/schema/energy_assessments.ts | 6 + src/app/db/schema/relations.ts | 15 ++ src/app/layout.tsx | 1 - .../energy-assessment/DocumentsTable.tsx | 5 +- .../[propertyId]/energy-assessment/page.tsx | 148 +++++++++++++++++- .../building-passport/[propertyId]/utils.ts | 6 +- tailwind.config.js | 1 + 10 files changed, 203 insertions(+), 21 deletions(-) diff --git a/src/app/components/Buttons.tsx b/src/app/components/Buttons.tsx index a568800..9d2d87d 100644 --- a/src/app/components/Buttons.tsx +++ b/src/app/components/Buttons.tsx @@ -19,18 +19,27 @@ export function TanButton({ ); } -export function BrandBlueButton({ +export function BrandButton({ label, onClick, + backgroundColor, }: { label: string; onClick: Dispatch>; + backgroundColor: "brandblue" | "brandgold"; // Restrict backgroundColor to these two options }) { - // General tan colored button + // Dictionary to map background colors to hover colors + const hoverColors = { + brandblue: "hover:bg-hoverblue", + brandgold: "hover:bg-hovergold", + }; + return (