Merged in fix/SW-1561-hotelpage-ui (pull request #2542)
Fix(SW-1561): Hotelpage design and token update * fix(SW-1561): fix sidepeek subtitle * fix(SW-1561): update mapCard to new tokens and update styling * fix(SW-1561): correct Typography lowcase titles Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -18,7 +18,7 @@ export default async function Essentials({ content }: EssentialsProps) {
|
||||
return (
|
||||
<section className={styles.essentialsSection}>
|
||||
<header className={styles.header}>
|
||||
<Typography variant="Title/smRegular">
|
||||
<Typography variant="Title/smLowCase">
|
||||
<h3 className={styles.heading}>{title}</h3>
|
||||
</Typography>
|
||||
{preamble ? (
|
||||
|
||||
@@ -34,7 +34,7 @@ export default function CampaignPageSkeleton() {
|
||||
</Typography>
|
||||
</div>
|
||||
<div>
|
||||
<Typography variant="Title/smRegular">
|
||||
<Typography variant="Title/smLowCase">
|
||||
<SkeletonShimmer width="30ch" />
|
||||
</Typography>
|
||||
<SkeletonShimmer width="100%" height="110px" />
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
"use client"
|
||||
|
||||
import Link from "next/link"
|
||||
import { useParams } from "next/navigation"
|
||||
import { useEffect, useState } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import Body from "@scandic-hotels/design-system/Body"
|
||||
import Caption from "@scandic-hotels/design-system/Caption"
|
||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||
import Title from "@scandic-hotels/design-system/Title"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import ButtonLink from "@/components/ButtonLink"
|
||||
import PoiMarker from "@/components/Maps/Markers/Poi"
|
||||
import { trackHotelMapClick } from "@/utils/tracking"
|
||||
|
||||
@@ -30,24 +27,18 @@ export default function MapCard({ hotelName, pois }: MapCardProps) {
|
||||
|
||||
return (
|
||||
<div className={styles.mapCard}>
|
||||
<Caption
|
||||
color="textMediumContrast"
|
||||
textTransform="uppercase"
|
||||
textAlign="center"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Nearby",
|
||||
})}
|
||||
</Caption>
|
||||
<Title
|
||||
color="burgundy"
|
||||
level="h3"
|
||||
as="h4"
|
||||
textAlign="center"
|
||||
textTransform="capitalize"
|
||||
>
|
||||
{hotelName}
|
||||
</Title>
|
||||
<span className={styles.heading}>
|
||||
<Typography variant="Title/Overline/sm" className={styles.nearby}>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Nearby",
|
||||
})}
|
||||
</span>
|
||||
</Typography>
|
||||
<Typography variant="Title/smLowCase" className={styles.hotelName}>
|
||||
<h3>{hotelName}</h3>
|
||||
</Typography>
|
||||
</span>
|
||||
<ul className={styles.poiList}>
|
||||
{pois.map((poi) => (
|
||||
<li key={poi.name} className={styles.poiItem}>
|
||||
@@ -57,27 +48,39 @@ export default function MapCard({ hotelName, pois }: MapCardProps) {
|
||||
skipBackground
|
||||
size={20}
|
||||
/>
|
||||
<Body color="black">{poi.name}</Body>
|
||||
<Caption>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "{distanceInKm} km",
|
||||
},
|
||||
{ distanceInKm: poi.distance }
|
||||
)}
|
||||
</Caption>
|
||||
<Typography>
|
||||
<span>{poi.name} </span>
|
||||
</Typography>
|
||||
<Typography
|
||||
variant="Body/Supporting text (caption)/smRegular"
|
||||
className={styles.distance}
|
||||
>
|
||||
<span>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
defaultMessage: "{distanceInKm} km",
|
||||
},
|
||||
{ distanceInKm: poi.distance }
|
||||
)}
|
||||
</span>
|
||||
</Typography>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
{mapUrl ? (
|
||||
<Button theme="base" intent="secondary" size="small" fullWidth asChild>
|
||||
<Link href={mapUrl} scroll={true} onClick={trackHotelMapClick}>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "See map",
|
||||
})}
|
||||
</Link>
|
||||
</Button>
|
||||
<ButtonLink
|
||||
variant="Secondary"
|
||||
color="Primary"
|
||||
size="Small"
|
||||
href={mapUrl}
|
||||
scroll={true}
|
||||
onClick={trackHotelMapClick}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "See map",
|
||||
})}
|
||||
</ButtonLink>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -4,23 +4,40 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: var(--Base-Surface-Primary-light-Normal);
|
||||
padding: var(--Spacing-x2);
|
||||
background-color: var(--Surface-Primary-Default);
|
||||
padding: var(--Space-x3);
|
||||
border-top-left-radius: var(--Corner-radius-md);
|
||||
border-top-right-radius: var(--Corner-radius-md);
|
||||
}
|
||||
|
||||
.poiList {
|
||||
list-style: none;
|
||||
margin-top: var(--Spacing-x1);
|
||||
margin-bottom: var(--Spacing-x2);
|
||||
margin-top: var(--Space-x1);
|
||||
margin-bottom: var(--Space-x2);
|
||||
}
|
||||
|
||||
.poiItem {
|
||||
display: grid;
|
||||
grid-template-columns: max-content 1fr max-content;
|
||||
gap: var(--Spacing-x-half);
|
||||
gap: var(--Space-x1);
|
||||
align-items: center;
|
||||
padding: var(--Spacing-x2) 0;
|
||||
border-bottom: 1px solid var(--Base-Border-Subtle);
|
||||
padding: var(--Space-x2) 0;
|
||||
border-bottom: 1px solid var(--Border-Divider-Default);
|
||||
}
|
||||
|
||||
.heading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.distance {
|
||||
color: var(--Text-Secondary);
|
||||
}
|
||||
|
||||
.nearby {
|
||||
color: var(--Text-Interactive-Secondary);
|
||||
}
|
||||
|
||||
.hotelName {
|
||||
color: var(--Text-Heading);
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import Body from "@scandic-hotels/design-system/Body"
|
||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||
import Title from "@scandic-hotels/design-system/Title"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import ButtonLink from "@/components/ButtonLink"
|
||||
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
||||
@@ -30,25 +28,29 @@ export default async function MeetingsAndConferencesSidePeek({
|
||||
return (
|
||||
<SidePeek contentKey={SidepeekSlugs.meetings} title={heading}>
|
||||
<div className={styles.wrapper}>
|
||||
<Subtitle color="burgundy" asChild>
|
||||
<Title level="h3">
|
||||
<Typography variant="Title/Subtitle/lg">
|
||||
<h3>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Creative spaces for meetings",
|
||||
})}
|
||||
</Title>
|
||||
</Subtitle>
|
||||
</h3>
|
||||
</Typography>
|
||||
{visibleImages?.length ? (
|
||||
<SidePeekImages images={visibleImages} />
|
||||
) : null}
|
||||
{descriptions?.medium && (
|
||||
<Body color="uiTextHighContrast">{descriptions.medium}</Body>
|
||||
<Typography>
|
||||
<p>{descriptions.medium}</p>
|
||||
</Typography>
|
||||
)}
|
||||
{roomText || seatingText ? (
|
||||
<Body color="uiTextMediumContrast">
|
||||
{roomText}
|
||||
{roomText && seatingText && <br />}
|
||||
{seatingText}
|
||||
</Body>
|
||||
<Typography className={styles.capacityDetails}>
|
||||
<span>
|
||||
{roomText}
|
||||
{roomText && seatingText && <br />}
|
||||
{seatingText}
|
||||
</span>
|
||||
</Typography>
|
||||
) : null}
|
||||
|
||||
{meetingPageHref ? (
|
||||
|
||||
@@ -15,3 +15,7 @@
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.capacityDetails {
|
||||
color: var(--Text-Secondary);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export default function Promo({
|
||||
)}
|
||||
<div className={styles.overlay} />
|
||||
<div className={styles.content}>
|
||||
<Typography variant="Title/smRegular">
|
||||
<Typography variant="Title/smLowCase">
|
||||
<p>{title}</p>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
|
||||
@@ -114,7 +114,7 @@ export default function Room({ booking, roomNr, user }: RoomProps) {
|
||||
|
||||
return (
|
||||
<article className={styles.multiRoom}>
|
||||
<Typography variant="Title/smRegular">
|
||||
<Typography variant="Title/smLowCase">
|
||||
<h3 className={styles.roomName}>{roomName}</h3>
|
||||
</Typography>
|
||||
<div className={styles.roomHeader}>
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function Card({ title, children }: CardProps) {
|
||||
})}
|
||||
/>
|
||||
<header>
|
||||
<Typography variant="Title/smRegular">
|
||||
<Typography variant="Title/smLowCase">
|
||||
<h4 className={styles.title}>{title}</h4>
|
||||
</Typography>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user