feat/SW-1756-meeting-package-content-pages
* feat(SW-1230): Changes to script to be able to reload after soft navigation * feat(SW-1756): Added meeting package widget on content pages Approved-by: Matilda Landström
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
"use client"
|
||||
|
||||
import { useRef } from "react"
|
||||
|
||||
import { StickyElementNameEnum } from "@/stores/sticky-position"
|
||||
|
||||
import MeetingPackageWidget from "@/components/MeetingPackageWidget"
|
||||
import useStickyPosition from "@/hooks/useStickyPosition"
|
||||
|
||||
import styles from "./stickyMeetingPackageWidget.module.css"
|
||||
|
||||
interface StickyMeetingPackageWidgetProps {
|
||||
destination?: string
|
||||
}
|
||||
|
||||
export default function StickyMeetingPackageWidget({
|
||||
destination,
|
||||
}: StickyMeetingPackageWidgetProps) {
|
||||
const ref = useRef<HTMLDivElement>(null)
|
||||
useStickyPosition({
|
||||
ref,
|
||||
name: StickyElementNameEnum.MEETING_PACKAGE_WIDGET,
|
||||
})
|
||||
|
||||
return (
|
||||
<div ref={ref} className={styles.wrapper}>
|
||||
<MeetingPackageWidget destination={destination} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
.wrapper {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: var(--Base-Surface-Primary-light-Normal);
|
||||
box-shadow: 0px 16px 24px 0px rgba(0, 0, 0, 0.08);
|
||||
z-index: var(--booking-widget-z-index);
|
||||
}
|
||||
Reference in New Issue
Block a user