Merged in feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow (pull request #2600)
feat(SW-2873): Move HotelReservationSidePeek to booking-flow * Move sidepeek store to booking-flow * Begin move of HotelReservationSidePeek to booking-flow * Copy Link * Update AccessibilityAccordionItem * Split AccessibilityAccordionItem into two components * Fix tracking for Accordion * Duplicate ButtonLink to booking-flow TEMP * AdditionalAmeneties * wip * Move sidepeek accordion items * Remove temp ButtonLink * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Fix accordion tracking * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Update exports * Fix self-referencing import * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Add 'use client' to tracking function * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow * Fix TEMP folder * Refactor sidepeek tracking * Merge branch 'master' into feat/sw-3218-move-hotelreservationsidepeek-to-booking-flow Approved-by: Joakim Jäderberg
This commit is contained in:
29
apps/scandic-web/components/utils.ts
Normal file
29
apps/scandic-web/components/utils.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { MaterialSymbolProps } from "@scandic-hotels/design-system/Icons/MaterialIcon/MaterialSymbol"
|
||||
|
||||
export function getBedIconName(name: string): MaterialSymbolProps["icon"] {
|
||||
const iconMappings = [
|
||||
{
|
||||
icon: "bed",
|
||||
texts: ["Queen"],
|
||||
},
|
||||
{
|
||||
icon: "king_bed",
|
||||
texts: ["King"],
|
||||
},
|
||||
{
|
||||
icon: "single_bed",
|
||||
texts: ["CustomOccupancy"],
|
||||
},
|
||||
{
|
||||
icon: "bed",
|
||||
texts: ["Twin"],
|
||||
},
|
||||
{
|
||||
icon: "single_bed",
|
||||
texts: ["Single"],
|
||||
},
|
||||
]
|
||||
|
||||
const icon = iconMappings.find((icon) => icon.texts.includes(name))
|
||||
return icon ? (icon.icon as MaterialSymbolProps["icon"]) : "single_bed"
|
||||
}
|
||||
Reference in New Issue
Block a user