Files
web/apps/scandic-web/components/Maps/Markers/Poi/index.tsx
Anton Gunnarsson b52a3f5847 Merged in feat/sw-3145-move-iconbyiconname-to-design-system (pull request #2589)
Move icon components to design-system

* Move icon components to design-system


Approved-by: Hrishikesh Vaipurkar
2025-08-04 11:32:00 +00:00

28 lines
820 B
TypeScript

import { IconByIconName } from "@scandic-hotels/design-system/Icons/IconByIconName"
import { getIconByPoiGroupAndCategory } from "../utils"
import { poiVariants } from "./variants"
import type { PoiMarkerProps } from "@/types/components/maps/poiMarker"
export default function PoiMarker({
group,
categoryName,
skipBackground,
size = "small",
className = "",
}: PoiMarkerProps) {
const iconName = getIconByPoiGroupAndCategory(group, categoryName)
const classNames = poiVariants({ group, skipBackground, size, className })
return iconName ? (
<span className={classNames}>
<IconByIconName
iconName={iconName}
color={skipBackground ? "Icon/Feedback/Neutral" : "Icon/Inverted"}
size={size === "small" ? 16 : size === "large" ? 24 : 20}
/>
</span>
) : null
}