fix(SW-2696): Added white-space: pre-line on paragraphs inside the about the hotel sidepeek to handle \n characters from API
Approved-by: Matilda Landström
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
<Divider color="baseSurfaceSubtleHover" />
|
||||
<Preamble>{descriptions.descriptions?.medium}</Preamble>
|
||||
<Body>{descriptions.facilityInformation}</Body>
|
||||
<Body>{descriptions.surroundingInformation}</Body>
|
||||
|
||||
{descriptions.descriptions ? (
|
||||
<Typography variant="Body/Lead text">
|
||||
<p className={styles.paragraph}>
|
||||
{descriptions.descriptions.medium}
|
||||
</p>
|
||||
</Typography>
|
||||
) : null}
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p className={styles.paragraph}>{descriptions.facilityInformation}</p>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p className={styles.paragraph}>
|
||||
{descriptions.surroundingInformation}
|
||||
</p>
|
||||
</Typography>
|
||||
</section>
|
||||
</SidePeek>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user