Files
Erik Tiekstra 3f632e6031 Merged in fix/BOOK-293-button-variants (pull request #3371)
fix(BOOK-293): changed variants and props on IconButton component

* fix(BOOK-293): changed variants and props on IconButton component

* fix(BOOK-293): inherit color for icon


Approved-by: Bianca Widstam
Approved-by: Christel Westerberg
2025-12-19 12:32:52 +00:00

75 lines
2.3 KiB
TypeScript

"use client"
import { useState } from "react"
import { Button as ButtonRAC } from "react-aria-components"
import { useIntl } from "react-intl"
import { Button } from "@scandic-hotels/design-system/Button"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import Modal from "@scandic-hotels/design-system/Modal"
import { Typography } from "@scandic-hotels/design-system/Typography"
import styles from "./guaranteeInfoModal.module.css"
export function GuaranteeInfoModal() {
const [isOpen, setIsOpen] = useState(false)
const intl = useIntl()
return (
<>
<ButtonRAC
type="button"
className={styles.infoButton}
onPress={() => setIsOpen(true)}
>
<MaterialIcon icon="info" size={20} color="CurrentColor" />
</ButtonRAC>
<Modal
title={intl.formatMessage({
id: "myStay.guaranteeInfoModal.heading",
defaultMessage: "Your booking is guaranteed",
})}
isOpen={isOpen}
onToggle={setIsOpen}
>
<div className={styles.content}>
<Typography variant="Body/Lead text">
<p>
{intl.formatMessage({
id: "myStay.guaranteeInfo.description",
defaultMessage:
"The hotel will hold your booking, even if you arrive after 18:00. In case of a no-show, you will be charged for the first night.",
})}
</p>
</Typography>
<Typography
variant="Body/Paragraph/mdRegular"
className={styles.textSecondary}
>
<p>
{intl.formatMessage({
id: "myStay.guaranteeInfoModal.ancillariesInfo",
defaultMessage:
"If you added extras, they'll be charged in case of a no-show, unless cancelled by 23:59 the night before.",
})}
</p>
</Typography>
<Button
className={styles.closeButton}
variant="Secondary"
color="Primary"
size="md"
onPress={() => setIsOpen(false)}
>
{intl.formatMessage({
id: "common.close",
defaultMessage: "Close",
})}
</Button>
</div>
</Modal>
</>
)
}