Files
web/packages/booking-flow/lib/components/EnterDetails/Header/index.tsx
Bianca Widstam 68c1b3dc50 Merged in chore/BOOK-708-replace-title-component (pull request #3414)
Chore/BOOK-708 replace title component

* chore(BOOK-708): replace title with typography

* chore(BOOK-708): replace title with typography

* chore(BOOK-708): remove Title from package.json


Approved-by: Linus Flood
Approved-by: Anton Gunnarsson
2026-01-12 07:54:59 +00:00

63 lines
1.9 KiB
TypeScript

"use client"
import { useIntl } from "react-intl"
import Image from "@scandic-hotels/design-system/Image"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { HotelDetailsSidePeek } from "../../HotelDetailsSidePeek"
import styles from "./header.module.css"
import type { HotelData } from "@scandic-hotels/trpc/types/hotel"
type HotelHeaderProps = {
hotelData: HotelData & { url: string | null }
}
export default function HotelHeader({
hotelData: { hotel, url, restaurants, additionalData },
}: HotelHeaderProps) {
const image = hotel.hotelContent?.images
const intl = useIntl()
const addressStr = `${hotel.address.streetAddress}, ${hotel.address.city}`
return (
<header className={styles.header}>
<Image
className={styles.hero}
alt={image.altText || image.altText_En || ""}
src={image.src}
height={200}
width={1196}
/>
<div className={styles.wrapper}>
<div className={styles.container}>
<div className={styles.titleContainer}>
<Typography variant="Title/lg" className={styles.title}>
<h1>{hotel.name}</h1>
</Typography>
<Typography variant="Title/md" className={styles.mobileTitle}>
<h1>{hotel.name}</h1>
</Typography>
<Typography variant="Title/Overline/sm">
<div className={styles.address}>{addressStr}</div>
</Typography>
</div>
<HotelDetailsSidePeek
hotel={{ ...hotel, url: url }}
restaurants={restaurants}
additionalHotelData={additionalData}
triggerLabel={intl.formatMessage({
id: "destination.seeHotelDetails",
defaultMessage: "See hotel details",
})}
buttonVariant="secondary"
/>
</div>
</div>
</header>
)
}