Feat/SW-475 enter details header * feat(SW-475): updated hotel mock data to reflect api * feat(SW-475): Added hotel selection header with sidepeek buttons * fix(SW-475): fixes from PR * fix(SW-475): changed intl string Approved-by: Arvid Norlin
59 lines
1.4 KiB
TypeScript
59 lines
1.4 KiB
TypeScript
"use client"
|
|
|
|
import { useState } from "react"
|
|
import { useIntl } from "react-intl"
|
|
|
|
import ChevronRightSmallIcon from "@/components/Icons/ChevronRightSmall"
|
|
import Button from "@/components/TempDesignSystem/Button"
|
|
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
|
|
|
import styles from "./hotelDetailSidePeek.module.css"
|
|
|
|
export default function HotelDetailSidePeek() {
|
|
const intl = useIntl()
|
|
const [isOpen, setIsOpen] = useState(false)
|
|
|
|
function toggleSidePeek() {
|
|
setIsOpen(!isOpen)
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<div className={styles.buttons}>
|
|
<Button
|
|
variant="icon"
|
|
theme="base"
|
|
intent="text"
|
|
wrapping
|
|
onClick={toggleSidePeek}
|
|
>
|
|
{intl.formatMessage({
|
|
id: "See hotel details",
|
|
})}
|
|
<ChevronRightSmallIcon aria-hidden="true" color="burgundy" />
|
|
</Button>
|
|
<Button
|
|
variant="icon"
|
|
theme="base"
|
|
intent="text"
|
|
wrapping
|
|
onClick={toggleSidePeek}
|
|
>
|
|
{intl.formatMessage({
|
|
id: "Show all amenities",
|
|
})}
|
|
<ChevronRightSmallIcon aria-hidden="true" color="burgundy" />
|
|
</Button>
|
|
</div>
|
|
<SidePeek
|
|
contentKey="hotel-detail-side-peek"
|
|
title="Hotel Details"
|
|
isOpen={isOpen}
|
|
handleClose={() => setIsOpen(false)}
|
|
>
|
|
<div>TBD</div>
|
|
</SidePeek>
|
|
</>
|
|
)
|
|
}
|