feat(SW-713): update styling for sidepeek
This commit is contained in:
@@ -45,49 +45,65 @@ export default function RoomSidePeek({
|
||||
isOpen={isSidePeekOpen}
|
||||
handleClose={() => setIsSidePeekOpen(false)}
|
||||
>
|
||||
<Body color="baseTextMediumContrast">
|
||||
{roomSize?.min === roomSize?.max
|
||||
? roomSize?.min
|
||||
: `${roomSize?.min} - ${roomSize?.max}`}
|
||||
m².{" "}
|
||||
{intl.formatMessage(
|
||||
{ id: "booking.accommodatesUpTo" },
|
||||
{ nrOfGuests: occupancy }
|
||||
)}
|
||||
</Body>
|
||||
|
||||
{images && (
|
||||
<div className={styles.imageContainer}>
|
||||
<ImageGallery images={images} title={selectedRoom.name} />
|
||||
<div className={styles.wrapper}>
|
||||
<div className={styles.mainContent}>
|
||||
<Body color="baseTextMediumContrast">
|
||||
{roomSize?.min === roomSize?.max
|
||||
? roomSize?.min
|
||||
: `${roomSize?.min} - ${roomSize?.max}`}
|
||||
m².{" "}
|
||||
{intl.formatMessage(
|
||||
{ id: "booking.accommodatesUpTo" },
|
||||
{ nrOfGuests: occupancy }
|
||||
)}
|
||||
</Body>
|
||||
{images && (
|
||||
<div className={styles.imageContainer}>
|
||||
<ImageGallery images={images} title={selectedRoom.name} />
|
||||
</div>
|
||||
)}
|
||||
<Body color="uiTextHighContrast">{roomDescription}</Body>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Body className={styles.description} color="uiTextHighContrast">
|
||||
{roomDescription}
|
||||
</Body>
|
||||
<Subtitle type="two" color="uiTextHighContrast">
|
||||
{intl.formatMessage({ id: "booking.thisRoomIsEquippedWith" })}
|
||||
</Subtitle>
|
||||
<ul className={styles.facilityList}>
|
||||
{selectedRoom?.roomFacilities
|
||||
.sort((a, b) => a.sortOrder - b.sortOrder)
|
||||
.map((facility) => {
|
||||
const Icon = getFacilityIcon(facility.name)
|
||||
|
||||
return (
|
||||
<li key={facility.name}>
|
||||
{Icon && <Icon color="uiTextMediumContrast" />}
|
||||
<Body
|
||||
asChild
|
||||
className={!Icon ? styles.noIcon : undefined}
|
||||
color="uiTextMediumContrast"
|
||||
>
|
||||
<span>{facility.name}</span>
|
||||
</Body>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
<div className={styles.listContainer}>
|
||||
<Subtitle type="two" color="uiTextHighContrast">
|
||||
{intl.formatMessage({ id: "booking.thisRoomIsEquippedWith" })}
|
||||
</Subtitle>
|
||||
<ul className={styles.facilityList}>
|
||||
{selectedRoom?.roomFacilities
|
||||
.sort((a, b) => a.sortOrder - b.sortOrder)
|
||||
.map((facility) => {
|
||||
const Icon = getFacilityIcon(facility.name)
|
||||
return (
|
||||
<li key={facility.name}>
|
||||
{Icon && <Icon color="uiTextMediumContrast" />}
|
||||
<Body
|
||||
asChild
|
||||
className={!Icon ? styles.noIcon : undefined}
|
||||
color="uiTextMediumContrast"
|
||||
>
|
||||
<span>{facility.name}</span>
|
||||
</Body>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
<div className={styles.listContainer}>
|
||||
<Subtitle type="two" color="uiTextHighContrast">
|
||||
{intl.formatMessage({ id: "booking.bedOptions" })}
|
||||
</Subtitle>
|
||||
<Body color="grey">
|
||||
{intl.formatMessage({ id: "booking.basedOnAvailability" })}
|
||||
</Body>
|
||||
{/* TODO: Get data for bed options */}
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.buttonContainer}>
|
||||
<Button fullWidth theme="base" intent="primary">
|
||||
{intl.formatMessage({ id: "booking.selectRoom" })}
|
||||
{/* TODO: Implement logic for select room */}
|
||||
</Button>
|
||||
</div>
|
||||
</SidePeek>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -4,20 +4,40 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.imageContainer {
|
||||
min-height: 185px;
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x2);
|
||||
position: relative;
|
||||
margin-bottom: calc(var(--Spacing-x4) * 2 + 20px);
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-top: var(--Spacing-x-one-and-half);
|
||||
margin-bottom: var(--Spacing-x2);
|
||||
.mainContent,
|
||||
.listContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x-one-and-half);
|
||||
}
|
||||
|
||||
.imageContainer {
|
||||
min-height: 280px;
|
||||
position: relative;
|
||||
border-radius: var(--Corner-radius-Medium);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.imageContainer img {
|
||||
width: 100%;
|
||||
aspect-ratio: 16/9;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.facilityList {
|
||||
margin-top: var(--Spacing-x-one-and-half);
|
||||
column-count: 2;
|
||||
column-gap: var(--Spacing-x2);
|
||||
}
|
||||
|
||||
.facilityList li {
|
||||
display: flex;
|
||||
gap: var(--Spacing-x1);
|
||||
@@ -27,3 +47,16 @@
|
||||
.noIcon {
|
||||
margin-left: var(--Spacing-x4);
|
||||
}
|
||||
|
||||
.buttonContainer {
|
||||
background-color: var(--Base-Background-Primary-Normal);
|
||||
border-top: 1px solid var(--Base-Border-Subtle);
|
||||
padding: var(--Spacing-x4) var(--Spacing-x2);
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user