feat(SW-827): Added bed types and icons
This commit is contained in:
37
components/SidePeeks/RoomSidePeek/bedIcon.ts
Normal file
37
components/SidePeeks/RoomSidePeek/bedIcon.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import { FC } from "react"
|
||||
|
||||
import {
|
||||
BedDoubleIcon,
|
||||
BedSingleIcon,
|
||||
KingBedSmallIcon,
|
||||
} from "@/components/Icons"
|
||||
|
||||
import { IconProps } from "@/types/components/icon"
|
||||
|
||||
export function getBedIcon(name: string): FC<IconProps> | null {
|
||||
const iconMappings = [
|
||||
{
|
||||
icon: BedDoubleIcon,
|
||||
texts: ["Queen"],
|
||||
},
|
||||
{
|
||||
icon: KingBedSmallIcon,
|
||||
texts: ["King"],
|
||||
},
|
||||
{
|
||||
icon: KingBedSmallIcon,
|
||||
texts: ["CustomOccupancy"],
|
||||
},
|
||||
{
|
||||
icon: BedSingleIcon,
|
||||
texts: ["Twin"],
|
||||
},
|
||||
{
|
||||
icon: BedSingleIcon,
|
||||
texts: ["Single"],
|
||||
},
|
||||
]
|
||||
|
||||
const icon = iconMappings.find((icon) => icon.texts.includes(name))
|
||||
return icon ? icon.icon : BedSingleIcon
|
||||
}
|
||||
Reference in New Issue
Block a user