From c20c6ed0164171bd4bbe1bb70dd07ecc5aa89c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matilda=20Landstr=C3=B6m?= Date: Thu, 31 Jul 2025 09:07:21 +0000 Subject: [PATCH] Merged in fix/SW-2038-map-button (pull request #2583) fix(SW-2038): add shadow to "See map" button and map overlay * fix(SW-2038): add shadow to button * fix(SW-2038): add overlay on map Approved-by: Anton Gunnarsson --- .../StaticMap/MapButton/index.tsx | 32 +++++++++---------- .../StaticMap/MapButton/mapButton.module.css | 3 ++ .../StaticMap/staticMap.module.css | 25 ++++++++++++--- 3 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 apps/scandic-web/components/ContentType/DestinationPage/StaticMap/MapButton/mapButton.module.css diff --git a/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/MapButton/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/MapButton/index.tsx index 539d61a5f..76405d931 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/MapButton/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/MapButton/index.tsx @@ -1,12 +1,14 @@ "use client" -import Link from "next/link" import { useParams } from "next/navigation" import { useEffect, useState } from "react" import { useIntl } from "react-intl" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" -import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton" + +import ButtonLink from "@/components/ButtonLink" + +import styles from "./mapButton.module.css" interface MapButtonProps { className?: string @@ -28,20 +30,18 @@ export default function MapButton({ className = "" }: MapButtonProps) { } return ( - + + {intl.formatMessage({ + defaultMessage: "See on map", + })} + ) } diff --git a/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/MapButton/mapButton.module.css b/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/MapButton/mapButton.module.css new file mode 100644 index 000000000..b8095acc7 --- /dev/null +++ b/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/MapButton/mapButton.module.css @@ -0,0 +1,3 @@ +.button { + box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.1); +} diff --git a/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/staticMap.module.css b/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/staticMap.module.css index bbb6a4e1b..86125e2ab 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/staticMap.module.css +++ b/apps/scandic-web/components/ContentType/DestinationPage/StaticMap/staticMap.module.css @@ -7,15 +7,32 @@ align-items: center; } -.mapWrapper img { - border-radius: var(--Corner-radius-lg); +.mapWrapper { + border-radius: var(--Corner-radius-md); overflow: hidden; } +.mapWrapper::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(31, 28, 27, 0); + transition: background-color 0.3s ease; + pointer-events: none; + z-index: 1; +} + +.mapWrapper:hover::before { + background-color: rgba(31, 28, 27, 0.1); +} + .button { position: absolute; - right: var(--Spacing-x2); - bottom: var(--Spacing-x2); + right: var(--Space-x2); + bottom: var(--Space-x2); } @media screen and (max-width: 1366px) {