diff --git a/apps/scandic-web/components/HotelReservation/HotelCard/HotelPriceCard/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCard/HotelPriceCard/index.tsx index c97bbadc5..aff938722 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCard/HotelPriceCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCard/HotelPriceCard/index.tsx @@ -1,3 +1,4 @@ +import { cx } from "class-variance-authority" import { useIntl } from "react-intl" import Divider from "@/components/TempDesignSystem/Divider" @@ -13,6 +14,7 @@ import { RateTypeEnum } from "@/types/enums/rateType" export default function HotelPriceCard({ productTypePrices, isMemberPrice = false, + className, }: PriceCardProps) { const intl = useIntl() const isRegularOrPublicPromotionRate = @@ -20,7 +22,7 @@ export default function HotelPriceCard({ productTypePrices.rateType === RateTypeEnum.PublicPromotion return ( -
+
{isRegularOrPublicPromotionRate && (isMemberPrice ? (
diff --git a/apps/scandic-web/components/HotelReservation/HotelCard/NoPriceAvailableCard/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCard/NoPriceAvailableCard/index.tsx index 42e5a7eb3..f2ce6cc7e 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCard/NoPriceAvailableCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCard/NoPriceAvailableCard/index.tsx @@ -1,8 +1,7 @@ import { useIntl } from "react-intl" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" - -import Caption from "@/components/TempDesignSystem/Text/Caption" +import { Typography } from "@scandic-hotels/design-system/Typography" import styles from "./noPriceAvailable.module.css" @@ -11,15 +10,15 @@ export default function NoPriceAvailableCard() { return (
-
- -
- - {intl.formatMessage({ - defaultMessage: - "There are no rooms available that match your request.", - })} - + + + + {intl.formatMessage({ + defaultMessage: + "There are no rooms available that match your request.", + })} + +
) diff --git a/apps/scandic-web/components/HotelReservation/HotelCard/hotelCard.module.css b/apps/scandic-web/components/HotelReservation/HotelCard/hotelCard.module.css index f948ee7d0..361a3ba80 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCard/hotelCard.module.css +++ b/apps/scandic-web/components/HotelReservation/HotelCard/hotelCard.module.css @@ -71,10 +71,6 @@ gap: var(--Spacing-x-half); } -.button { - min-width: 160px; -} - .specialAlerts { display: flex; flex-direction: column; @@ -87,6 +83,22 @@ gap: var(--Spacing-x-one-and-half); } +.link:hover { + .fakeButton { + background-color: var(--Component-Button-Brand-Primary-Fill-Hover); + border-color: var(--Component-Button-Brand-Primary-Border-Hover); + color: var(--Component-Button-Brand-Primary-On-fill-Hover); + } + + .priceCard { + background: linear-gradient( + 0deg, + var(--Surface-Primary-Hover) 0%, + var(--Surface-Primary-Hover) 100% + ); + } +} + .strikedText { text-decoration: line-through; } @@ -97,6 +109,28 @@ border-radius: var(--Corner-radius-md); } +.fakeButton { + min-width: 160px; + border-radius: var(--Corner-radius-rounded); + border-width: 2px; + border-style: solid; + display: flex; + align-items: center; + justify-content: center; + gap: var(--Space-x05); + + padding: 10px var(--Space-x2); + background-color: var(--Component-Button-Brand-Primary-Fill-Default); + border-color: var(--Component-Button-Brand-Primary-Border-Default); + color: var(--Component-Button-Brand-Primary-On-fill-Default); +} + +.fakeButton.disabled { + background-color: var(--Component-Button-Brand-Primary-Fill-Disabled); + border-color: var(--Component-Button-Brand-Primary-Border-Disabled); + color: var(--Component-Button-Brand-Primary-On-fill-Disabled); +} + @media screen and (min-width: 768px) and (max-width: 1024px) { .imageContainer { height: 180px; @@ -140,7 +174,7 @@ margin-bottom: var(--Spacing-x-one-and-half); } - .pageListing .button { + .pageListing .fakeButton { width: 100%; } diff --git a/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx index 42a6b9d21..152ff2e74 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx @@ -1,5 +1,6 @@ "use client" +import { cx } from "class-variance-authority" import { useParams } from "next/dist/client/components/navigation" import { useRouter, useSearchParams } from "next/navigation" import { memo } from "react" @@ -14,7 +15,6 @@ import { useHotelsMapStore } from "@/stores/hotels-map" import BookingCodeChip from "@/components/BookingCodeChip" import { FacilityToIcon } from "@/components/ContentType/HotelPage/data" import ImageGallery from "@/components/ImageGallery" -import Button from "@/components/TempDesignSystem/Button" import Divider from "@/components/TempDesignSystem/Divider" import Link from "@/components/TempDesignSystem/Link" import Body from "@/components/TempDesignSystem/Text/Body" @@ -79,6 +79,8 @@ function HotelCard({ defaultMessage: "Not enough points", }) + const isDisabled = price?.redemptions?.length && hasInsufficientPoints + return (
-
+ {!availability.productType ? ( ) : ( @@ -187,11 +192,15 @@ function HotelCard({ !price?.member || (bookingCode && !fullPrice)) && price?.public && ( - + )} {availability.productType.member && ( )} @@ -222,47 +231,52 @@ function HotelCard({ ))}
) : null} - {price?.redemptions?.length && hasInsufficientPoints ? ( + {isDisabled ? ( - +
+ + {notEnoughPointsLabel} + +
) : ( - +
+ + + {intl.formatMessage({ + defaultMessage: "See rooms", + })} + + +
)} )} -
+ ) } +interface PricesWrapperProps { + href: string + isClickable?: boolean + children: React.ReactNode +} +function PricesWrapper({ href, isClickable, children }: PricesWrapperProps) { + const content =
{children}
+ + return isClickable ? ( + + {content} + + ) : ( + content + ) +} + export default memo(HotelCard) diff --git a/apps/scandic-web/types/components/hotelReservation/selectHotel/priceCardProps.ts b/apps/scandic-web/types/components/hotelReservation/selectHotel/priceCardProps.ts index d98c27470..1f95c1248 100644 --- a/apps/scandic-web/types/components/hotelReservation/selectHotel/priceCardProps.ts +++ b/apps/scandic-web/types/components/hotelReservation/selectHotel/priceCardProps.ts @@ -7,6 +7,7 @@ import type { export type PriceCardProps = { productTypePrices: ProductTypePrices isMemberPrice?: boolean + className?: string } export type PointsRowProps = {