Merged in feat/SW-630-alerts-on-hotel-card (pull request #909)
Feat/SW-630 alerts on hotel card Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -7,6 +7,7 @@ import { selectHotelMap } from "@/constants/routes/hotelReservation"
|
||||
|
||||
import { mapFacilityToIcon } from "@/components/ContentType/HotelPage/data"
|
||||
import ImageGallery from "@/components/ImageGallery"
|
||||
import Alert from "@/components/TempDesignSystem/Alert"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Divider from "@/components/TempDesignSystem/Divider"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
@@ -132,6 +133,13 @@ export default function HotelCard({
|
||||
hotel={hotelData}
|
||||
showCTA={true}
|
||||
/>
|
||||
{hotelData.specialAlerts.length > 0 && (
|
||||
<div className={styles.specialAlerts}>
|
||||
{hotelData.specialAlerts.map((alert) => (
|
||||
<Alert key={alert.id} type={alert.type} text={alert.text} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
<div className={styles.prices}>
|
||||
<HotelPriceList price={price} />
|
||||
|
||||
@@ -44,23 +44,25 @@ export default function Alert({
|
||||
<h2>{heading}</h2>
|
||||
</Body>
|
||||
) : null}
|
||||
<Body className={styles.text}>
|
||||
{text}
|
||||
{phoneContact?.phoneNumber ? (
|
||||
<>
|
||||
<span> {phoneContact.displayText} </span>
|
||||
<Link
|
||||
color="burgundy"
|
||||
href={`tel:${phoneContact.phoneNumber.replace(/ /g, "")}`}
|
||||
>
|
||||
{phoneContact.phoneNumber}
|
||||
</Link>
|
||||
{phoneContact.footnote ? (
|
||||
<span>. ({phoneContact.footnote})</span>
|
||||
) : null}
|
||||
</>
|
||||
) : null}
|
||||
</Body>
|
||||
{text ? (
|
||||
<Body className={styles.text}>
|
||||
{text}
|
||||
{phoneContact?.phoneNumber ? (
|
||||
<>
|
||||
<span> {phoneContact.displayText} </span>
|
||||
<Link
|
||||
color="burgundy"
|
||||
href={`tel:${phoneContact.phoneNumber.replace(/ /g, "")}`}
|
||||
>
|
||||
{phoneContact.phoneNumber}
|
||||
</Link>
|
||||
{phoneContact.footnote ? (
|
||||
<span>. ({phoneContact.footnote})</span>
|
||||
) : null}
|
||||
</>
|
||||
) : null}
|
||||
</Body>
|
||||
) : null}
|
||||
</div>
|
||||
{link ? (
|
||||
<Link color="burgundy" href={link.url}>
|
||||
|
||||
Reference in New Issue
Block a user