From 53b5082158660b378e1d134e27252f94edeea7d8 Mon Sep 17 00:00:00 2001 From: Kenneth Brewer Date: Wed, 29 Apr 2026 13:55:36 -0400 Subject: [PATCH] Map markers are now their own SVG that have an accurate point to the coordinate. Also the map marker accepts an icon parameter for future UI improvement. Currently the default map icon is a white circle. --- admin/inertia/components/maps/MarkerPin.tsx | 69 ++++++++++++++++++--- 1 file changed, 62 insertions(+), 7 deletions(-) diff --git a/admin/inertia/components/maps/MarkerPin.tsx b/admin/inertia/components/maps/MarkerPin.tsx index 94c86af..44d3e72 100644 --- a/admin/inertia/components/maps/MarkerPin.tsx +++ b/admin/inertia/components/maps/MarkerPin.tsx @@ -1,17 +1,72 @@ -import { IconMapPinFilled } from '@tabler/icons-react' +import {IconCircleFilled} from '@tabler/icons-react' +import type { ComponentType, CSSProperties } from 'react' + +type MarkerIconProps = { + size?: number + color?: string + style?: CSSProperties + className?: string +} interface MarkerPinProps { color?: string active?: boolean + Icon?: ComponentType + iconColor?: string } -export default function MarkerPin({ color = '#a84a12', active = false }: MarkerPinProps) { +export default function MarkerPin({ + color = '#a84a12', + active = false, + Icon = IconCircleFilled, + iconColor = '#ffffff', + }: MarkerPinProps) { + const width = active ? 42 : 36 + const height = active ? 52 : 46 + const iconSize = active ? 18 : 16 + return ( -
- +
+ + +
+ +
) } +