feat(SW-340): Added scroll to top button

This commit is contained in:
Pontus Dreij
2024-11-08 10:00:53 +01:00
parent 2748120890
commit 5f46844b9b
22 changed files with 238 additions and 99 deletions

View File

@@ -2,14 +2,15 @@ import { HotelsAvailabilityPrices } from "@/server/routers/hotels/output"
import { Hotel } from "@/types/hotel"
export enum HotelCardListingType {
export enum HotelCardListingTypeEnum {
MapListing = "mapListing",
PageListing = "pageListing",
}
export type HotelCardListingProps = {
hotelData: HotelData[]
type?: HotelCardListingType
type?: HotelCardListingTypeEnum
state?: "default" | "active"
}
export type HotelData = {

View File

@@ -1,6 +1,10 @@
import { HotelCardListingType, HotelData } from "./hotelCardListingProps"
import {
HotelCardListingTypeEnum,
type HotelData,
} from "./hotelCardListingProps"
export type HotelCardProps = {
hotel: HotelData
type?: HotelCardListingType
type?: HotelCardListingTypeEnum
state?: "default" | "active"
}

View File

@@ -12,6 +12,7 @@ import type { Coordinates } from "@/types/components/maps/coordinates"
export interface HotelListingProps {
hotels: HotelData[]
cardState?: "default" | "active"
// pointsOfInterest: PointOfInterest[]
// activePoi: PointOfInterest["name"] | null
// onActivePoiChange: (poi: PointOfInterest["name"] | null) => void
@@ -42,3 +43,15 @@ export type HotelPin = {
amenities: Filter[]
ratings: number | null
}
export interface HotelListingMapContentProps {
activeHotelPin?: HotelPin["name"] | null
hotelPins: HotelPin[]
onActiveHotelPinChange?: (pinName: string | null) => void
}
export interface HotelCardDialogProps {
isOpen: boolean
pin: HotelPin
handleClose: (event: { stopPropagation: () => void }) => void
}