feat(BOOK-472): Different placement of no availability alert on mobile viewports

Approved-by: Bianca Widstam
This commit is contained in:
Erik Tiekstra
2025-11-10 12:38:42 +00:00
parent 89262ffb82
commit 69f852a2d3
6 changed files with 107 additions and 66 deletions

View File

@@ -1,4 +1,5 @@
"use client"
import { cx } from "class-variance-authority"
import { useIntl } from "react-intl"
import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert"
@@ -11,11 +12,15 @@ import useLang from "../../../../../hooks/useLang"
import styles from "./alert.module.css"
interface NoAvailabilityAlertProps {
roomIndex: number
className?: string
}
export default function NoAvailabilityAlert({
roomIndex,
}: {
roomIndex: number
}) {
className,
}: NoAvailabilityAlertProps) {
const lang = useLang()
const intl = useIntl()
@@ -51,7 +56,7 @@ export default function NoAvailabilityAlert({
defaultMessage: "There are no rooms available that match your request.",
})
return (
<div className={styles.hotelAlert}>
<div className={cx(styles.hotelAlert, className)}>
<Alert
type={AlertTypeEnum.Info}
heading={intl.formatMessage({
@@ -92,7 +97,7 @@ export default function NoAvailabilityAlert({
)
return (
<div className={styles.hotelAlert}>
<div className={cx(styles.hotelAlert, className)}>
<Alert
type={AlertTypeEnum.Info}
heading={intl.formatMessage({