From 604a0cf5be1b5664979fe6771e2528cf1b588492 Mon Sep 17 00:00:00 2001 From: Erik Tiekstra Date: Wed, 14 May 2025 13:37:05 +0000 Subject: [PATCH] fix(SW-2696): Added white-space: pre-line on paragraphs inside the about the hotel sidepeek to handle \n characters from API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Approved-by: Matilda Landström --- .../AboutTheHotel/aboutTheHotel.module.css | 10 +++++--- .../SidePeeks/AboutTheHotel/index.tsx | 23 +++++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/aboutTheHotel.module.css b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/aboutTheHotel.module.css index 00ab8aebe..c3a257287 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/aboutTheHotel.module.css +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/aboutTheHotel.module.css @@ -1,5 +1,9 @@ .wrapper { - display: flex; - flex-direction: column; - gap: var(--Spacing-x3); + display: grid; + gap: var(--Space-x3); +} + +.paragraph { + color: var(--Text-Default); + white-space: pre-line; } diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx index 87e42a9df..40ab94caf 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/index.tsx @@ -1,7 +1,7 @@ +import { Typography } from "@scandic-hotels/design-system/Typography" + import Divider from "@/components/TempDesignSystem/Divider" import SidePeek from "@/components/TempDesignSystem/SidePeek" -import Body from "@/components/TempDesignSystem/Text/Body" -import Preamble from "@/components/TempDesignSystem/Text/Preamble" import { getIntl } from "@/i18n" import ContactInformation from "./ContactInformation" @@ -37,9 +37,22 @@ export default async function AboutTheHotelSidePeek({ ecoLabels={ecoLabels} /> - {descriptions.descriptions?.medium} - {descriptions.facilityInformation} - {descriptions.surroundingInformation} + + {descriptions.descriptions ? ( + +

+ {descriptions.descriptions.medium} +

+
+ ) : null} + +

{descriptions.facilityInformation}

+
+ +

+ {descriptions.surroundingInformation} +

+
)