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
33 lines
852 B
TypeScript
33 lines
852 B
TypeScript
import { Typography } from "@scandic-hotels/design-system/Typography"
|
|
|
|
import { getIntl } from "@/i18n"
|
|
|
|
import styles from "./header.module.css"
|
|
|
|
import type { Hotel } from "@scandic-hotels/trpc/types/hotel"
|
|
|
|
export async function Header({
|
|
cityName,
|
|
name,
|
|
}: Pick<Hotel, "cityName" | "name">) {
|
|
const intl = await getIntl()
|
|
return (
|
|
<header className={styles.header}>
|
|
<Typography variant="Title/Decorative/lg" className={styles.myStayAt}>
|
|
<h2>
|
|
{intl.formatMessage({
|
|
id: "myStay.header.myStayAt",
|
|
defaultMessage: "My stay at",
|
|
})}
|
|
</h2>
|
|
</Typography>
|
|
<Typography variant="Title/lg">
|
|
<h2 className={styles.hotelName}>{name}</h2>
|
|
</Typography>
|
|
<Typography variant="Title/md">
|
|
<h3>{cityName}</h3>
|
|
</Typography>
|
|
</header>
|
|
)
|
|
}
|