feat(SW-325): added pois to the list and dynamic map

This commit is contained in:
Erik Tiekstra
2024-09-17 16:13:22 +02:00
parent 1729f4b9c7
commit e79f413003
44 changed files with 1078 additions and 318 deletions

View File

@@ -0,0 +1,27 @@
import { getIconByIconName } from "@/components/Icons/get-icon-by-icon-name"
import { getCategoryIconName } from "../utils"
import { poiVariants } from "./variants"
import { PoiMarkerProps } from "@/types/components/maps/poiMarker"
export default function PoiMarker({
category,
skipBackground,
size = 16,
className = "",
}: PoiMarkerProps) {
const iconName = getCategoryIconName(category)
const Icon = iconName ? getIconByIconName(iconName) : null
const classNames = poiVariants({ category, skipBackground, className })
return Icon ? (
<span className={classNames}>
<Icon
color={skipBackground ? "grey80" : "white"}
width={size}
height={size}
/>
</span>
) : null
}