Merged in feat/SW-1711-switch-icons (pull request #1558)

Switches out all the old icons to new ones, and moves them to the design system. The new icons are of three different types: Materialise Symbol, Nucleo, and Customized. Also adds further mapping between facilities/amenities and icons.

Approved-by: Michael Zetterberg
Approved-by: Erik Tiekstra
This commit is contained in:
Matilda Landström
2025-03-27 09:42:52 +00:00
parent 93c7fe64bf
commit 5de2a993a7
524 changed files with 4442 additions and 6802 deletions

View File

@@ -1,5 +1,7 @@
import { useIntl } from "react-intl"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons"
import ImageGallery from "@/components/ImageGallery"
import SidePeek from "@/components/TempDesignSystem/SidePeek"
import Body from "@/components/TempDesignSystem/Text/Body"
@@ -7,8 +9,8 @@ import Caption from "@/components/TempDesignSystem/Text/Caption"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
import { mapApiImagesToGalleryImages } from "@/utils/imageGallery"
import { getBedIcon } from "./bedIcon"
import { getFacilityIcon } from "./facilityIcon"
import { getBedIconName } from "./bedIcon"
import { FacilityIcon } from "./facilityIcon"
import styles from "./roomSidePeek.module.css"
@@ -85,16 +87,16 @@ export default function RoomSidePeek({
{room.roomFacilities
.sort((a, b) => a.sortOrder - b.sortOrder)
.map((facility) => {
const Icon = getFacilityIcon(facility.icon)
const Icon = (
<FacilityIcon
name={facility.icon}
size={24}
color="Icon/Default"
/>
)
return (
<li key={facility.name}>
{Icon && (
<Icon
width={24}
height={24}
color="uiTextMediumContrast"
/>
)}
{Icon && Icon}
<Body
asChild
className={!Icon ? styles.noIcon : undefined}
@@ -116,16 +118,10 @@ export default function RoomSidePeek({
</Body>
<ul className={styles.bedOptions}>
{room.roomTypes.map((roomType) => {
const BedIcon = getBedIcon(roomType.mainBed.type)
const bedIcon = getBedIconName(roomType.mainBed.type)
return (
<li key={roomType.code}>
{BedIcon && (
<BedIcon
color="uiTextMediumContrast"
width={24}
height={24}
/>
)}
<MaterialIcon icon={bedIcon} color="Icon/Feedback/Neutral" />
<Body color="uiTextMediumContrast" asChild>
<span>{roomType.mainBed.description}</span>
</Body>