feat(SW-472): Add EnterDetails SidePeek
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
.article {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x2);
|
||||
}
|
||||
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x2);
|
||||
}
|
||||
42
components/HotelReservation/EnterDetails/SidePeek/index.tsx
Normal file
42
components/HotelReservation/EnterDetails/SidePeek/index.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
"use client"
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { useEnterDetailsStore } from "@/stores/enter-details"
|
||||
|
||||
import Contact from "@/components/HotelReservation/Contact"
|
||||
import Divider from "@/components/TempDesignSystem/Divider"
|
||||
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
|
||||
import styles from "./enterDetailsSidePeek.module.css"
|
||||
|
||||
import {
|
||||
SidePeekEnum,
|
||||
SidePeekProps,
|
||||
} from "@/types/components/enterDetails/sidePeek"
|
||||
|
||||
export default function EnterDetailsSidePeek({ hotel }: SidePeekProps) {
|
||||
const activeSidePeek = useEnterDetailsStore((state) => state.activeSidePeek)
|
||||
const close = useEnterDetailsStore((state) => state.closeSidePeek)
|
||||
|
||||
const intl = useIntl()
|
||||
return (
|
||||
<SidePeek
|
||||
contentKey={SidePeekEnum.hotelDetails}
|
||||
title={intl.formatMessage({ id: "About the hotel" })}
|
||||
isOpen={activeSidePeek === SidePeekEnum.hotelDetails}
|
||||
handleClose={close}
|
||||
>
|
||||
<article className={styles.article}>
|
||||
<Contact hotel={hotel} />
|
||||
<Divider />
|
||||
<section className={styles.section}>
|
||||
<Body>{hotel.hotelContent.texts.descriptions.medium}</Body>
|
||||
|
||||
<Body>{hotel.hotelContent.texts.facilityInformation}</Body>
|
||||
</section>
|
||||
</article>
|
||||
</SidePeek>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user