Merged in fix/SW-2292-new-hotel-header (pull request #2253)
fix(SW-2292): new design for hotel header on enter details * fix(SW-2292): new design for hotel header on enter details Approved-by: Michael Zetterberg
This commit is contained in:
@@ -18,7 +18,7 @@ export default function ToggleSidePeek({ hotelId }: ToggleSidePeekProps) {
|
|||||||
<Button
|
<Button
|
||||||
onPress={() => openSidePeek({ key: SidePeekEnum.hotelDetails, hotelId })}
|
onPress={() => openSidePeek({ key: SidePeekEnum.hotelDetails, hotelId })}
|
||||||
size="Small"
|
size="Small"
|
||||||
variant="Text"
|
variant="Secondary"
|
||||||
color="Inverted"
|
color="Inverted"
|
||||||
wrapping
|
wrapping
|
||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
max-width: var(--max-width-page);
|
max-width: var(--max-width-page);
|
||||||
gap: var(--Space-x05);
|
gap: var(--Space-x2);
|
||||||
padding: var(--Space-x3) 0;
|
padding: var(--Space-x3) 0 var(--Space-x4);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,22 +59,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.address {
|
.address {
|
||||||
display: none;
|
text-align: center;
|
||||||
flex-wrap: wrap;
|
color: var(--Text-Inverted);
|
||||||
column-gap: var(--Space-x15);
|
|
||||||
font-style: normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.address {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.container {
|
.container {
|
||||||
padding: var(--Space-x3) 0;
|
padding: var(--Space-x3) 0;
|
||||||
|
gap: var(--Space-x3);
|
||||||
}
|
}
|
||||||
.mobileTitle {
|
.mobileTitle {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.titleContainer {
|
||||||
|
gap: var(--Space-x1);
|
||||||
|
}
|
||||||
.title {
|
.title {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import Image from "@/components/Image"
|
import Image from "@/components/Image"
|
||||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
|
||||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||||
import { getIntl } from "@/i18n"
|
|
||||||
import { getSingleDecimal } from "@/utils/numberFormatting"
|
|
||||||
|
|
||||||
import ToggleSidePeek from "./ToggleSidePeek"
|
import ToggleSidePeek from "./ToggleSidePeek"
|
||||||
|
|
||||||
@@ -13,7 +12,6 @@ import type { HotelHeaderProps } from "@/types/components/hotelReservation/enter
|
|||||||
export default async function HotelHeader({
|
export default async function HotelHeader({
|
||||||
hotelData: { hotel },
|
hotelData: { hotel },
|
||||||
}: HotelHeaderProps) {
|
}: HotelHeaderProps) {
|
||||||
const intl = await getIntl()
|
|
||||||
const image = hotel.hotelContent?.images
|
const image = hotel.hotelContent?.images
|
||||||
|
|
||||||
const addressStr = `${hotel.address.streetAddress}, ${hotel.address.city}`
|
const addressStr = `${hotel.address.streetAddress}, ${hotel.address.city}`
|
||||||
@@ -30,7 +28,13 @@ export default async function HotelHeader({
|
|||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div className={styles.titleContainer}>
|
<div className={styles.titleContainer}>
|
||||||
<Title as="h1" level="h1" color="white" className={styles.title}>
|
<Title
|
||||||
|
as="h1"
|
||||||
|
level="h1"
|
||||||
|
color="white"
|
||||||
|
textAlign="center"
|
||||||
|
className={styles.title}
|
||||||
|
>
|
||||||
{hotel.name}
|
{hotel.name}
|
||||||
</Title>
|
</Title>
|
||||||
<Title
|
<Title
|
||||||
@@ -38,26 +42,13 @@ export default async function HotelHeader({
|
|||||||
level="h1"
|
level="h1"
|
||||||
color="white"
|
color="white"
|
||||||
className={styles.mobileTitle}
|
className={styles.mobileTitle}
|
||||||
|
textAlign="center"
|
||||||
>
|
>
|
||||||
{hotel.name}
|
{hotel.name}
|
||||||
</Title>
|
</Title>
|
||||||
<div className={styles.address}>
|
<Typography variant="Title/Overline/sm">
|
||||||
<Caption color="white">{addressStr}</Caption>
|
<div className={styles.address}>{addressStr}</div>
|
||||||
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
|
</Typography>
|
||||||
<Caption color="white">∙</Caption>
|
|
||||||
<Caption color="white">
|
|
||||||
{intl.formatMessage(
|
|
||||||
{
|
|
||||||
defaultMessage: "{number} km to city center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
number: getSingleDecimal(
|
|
||||||
hotel.location.distanceToCentre / 1000
|
|
||||||
),
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
</Caption>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<ToggleSidePeek hotelId={hotel.operaId} />
|
<ToggleSidePeek hotelId={hotel.operaId} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user