feat(SW-74): add hotel information
This commit is contained in:
75
components/HotelReservation/HotelCard/hotelCard.module.css
Normal file
75
components/HotelReservation/HotelCard/hotelCard.module.css
Normal file
@@ -0,0 +1,75 @@
|
||||
.card {
|
||||
display: grid;
|
||||
background-color: var(--Base-Surface-Primary-Normal);
|
||||
border: 1px solid var(--Base-Border-Subtle);
|
||||
border-radius: var(--Corner-radius-Small);
|
||||
min-height: 460px;
|
||||
}
|
||||
|
||||
.image {
|
||||
height: auto;
|
||||
min-height: 160px;
|
||||
object-fit: cover;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.information {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x2);
|
||||
padding: var(--Spacing-x2);
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x1);
|
||||
}
|
||||
|
||||
.description {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x1);
|
||||
font-family: var(--typography-Caption-Regular-fontFamily);
|
||||
font-size: var(--typography-Caption-Regular-fontSize);
|
||||
}
|
||||
|
||||
.chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--Spacing-x1);
|
||||
}
|
||||
|
||||
.booking {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--Spacing-x1);
|
||||
}
|
||||
|
||||
.button {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 850px) {
|
||||
.card {
|
||||
grid-template-columns: 1fr min(480px);
|
||||
min-height: 270px;
|
||||
max-width: 850px;
|
||||
}
|
||||
|
||||
.image {
|
||||
min-height: 270px;
|
||||
}
|
||||
|
||||
.booking {
|
||||
justify-content: space-between;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.button {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
47
components/HotelReservation/HotelCard/index.tsx
Normal file
47
components/HotelReservation/HotelCard/index.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import { ScandicLogoIcon } from "@/components/Icons"
|
||||
import Image from "@/components/Image"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Chip from "@/components/TempDesignSystem/Chip"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import styles from "./hotelCard.module.css"
|
||||
|
||||
import { HotelCardProps } from "@/types/components/hotelReservation/selectHotel/hotelCardProps"
|
||||
|
||||
export default async function HotelCard({ hotel }: HotelCardProps) {
|
||||
const { formatMessage } = await getIntl()
|
||||
return (
|
||||
<article className={styles.card}>
|
||||
<Image src="" alt="hotel image" className={styles.image} />
|
||||
<div className={styles.information}>
|
||||
<header className={styles.title}>
|
||||
<ScandicLogoIcon color="red" />
|
||||
<Title as="h4" textTransform="capitalize">
|
||||
{hotel.name}
|
||||
</Title>
|
||||
</header>
|
||||
<div className={styles.description}>
|
||||
<span>{`${hotel.address.streetAddress}, ${hotel.address.city}`}</span>
|
||||
<span>{hotel.hotelContent.texts.descriptions.short}</span>
|
||||
</div>
|
||||
<div className={styles.chips}>
|
||||
{hotel.detailedFacilities.slice(0, 6).map((chip, index) => (
|
||||
<Chip key={`chip-${index}`}>{chip.name}</Chip>
|
||||
))}
|
||||
</div>
|
||||
<footer className={styles.booking}>
|
||||
<Button
|
||||
theme="base"
|
||||
intent="primary"
|
||||
size="small"
|
||||
className={styles.button}
|
||||
>
|
||||
{formatMessage({ id: "Book" })}
|
||||
</Button>
|
||||
</footer>
|
||||
</div>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user