From 821f667d064463e3e502d904ef7d5f569f9a21a6 Mon Sep 17 00:00:00 2001
From: Pontus Dreij
Date: Fri, 15 Nov 2024 14:06:33 +0100
Subject: [PATCH] feat(SW-630) Added alerts to hotel cards
---
.../HotelCard/hotelCard.module.css | 6 ++++
.../HotelReservation/HotelCard/index.tsx | 8 +----
components/TempDesignSystem/Alert/index.tsx | 36 ++++++++++---------
3 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/components/HotelReservation/HotelCard/hotelCard.module.css b/components/HotelReservation/HotelCard/hotelCard.module.css
index a0c15eb5b..b20a7e30d 100644
--- a/components/HotelReservation/HotelCard/hotelCard.module.css
+++ b/components/HotelReservation/HotelCard/hotelCard.module.css
@@ -85,6 +85,12 @@
min-width: 160px;
}
+.specialAlerts {
+ display: flex;
+ flex-direction: column;
+ gap: var(--Spacing-x1);
+}
+
@media screen and (min-width: 1367px) {
.card.pageListing {
flex-direction: row;
diff --git a/components/HotelReservation/HotelCard/index.tsx b/components/HotelReservation/HotelCard/index.tsx
index e9204c709..4c478d275 100644
--- a/components/HotelReservation/HotelCard/index.tsx
+++ b/components/HotelReservation/HotelCard/index.tsx
@@ -39,8 +39,6 @@ export default function HotelCard({
const { hotelData } = hotel
const { price } = hotel
- console.log(hotelData)
-
const amenities = hotelData.detailedFacilities.slice(0, 5)
const classNames = hotelCardVariants({
@@ -138,11 +136,7 @@ export default function HotelCard({
{hotelData.specialAlerts.length > 0 && (
{hotelData.specialAlerts.map((alert) => (
-
+
))}
)}
diff --git a/components/TempDesignSystem/Alert/index.tsx b/components/TempDesignSystem/Alert/index.tsx
index 2c511b725..8f063d39d 100644
--- a/components/TempDesignSystem/Alert/index.tsx
+++ b/components/TempDesignSystem/Alert/index.tsx
@@ -44,23 +44,25 @@ export default function Alert({
{heading}
- {text}
- {phoneContact?.phoneNumber ? (
- <>
- {phoneContact.displayText}
-
- {phoneContact.phoneNumber}
-
- {phoneContact.footnote ? (
- . ({phoneContact.footnote})
- ) : null}
- >
- ) : null}
-
+ {text}
+ {phoneContact?.phoneNumber ? (
+ <>
+ {phoneContact.displayText}
+
+ {phoneContact.phoneNumber}
+
+ {phoneContact.footnote ? (
+ . ({phoneContact.footnote})
+ ) : null}
+ >
+ ) : null}
+