MCPcopy
hub / github.com/yousifamanuel/terraink / createSvgIcon

Function createSvgIcon

src/features/markers/infrastructure/iconRegistry.ts:27–42  ·  view source on GitHub ↗
(id: string, label: string, component: IconType)

Source from the content-addressed store, hash-verified

25import { MARKER_FEATURED_ICON_COUNT } from "@/features/markers/infrastructure/constants";
26
27function createSvgIcon(id: string, label: string, component: IconType) {
28 return {
29 id,
30 label,
31 source: "predefined",
32 kind: "svg",
33 component,
34 svgMarkup: renderToStaticMarkup(
35 createElement(component, {
36 size: 24,
37 color: "currentColor",
38 "aria-hidden": true,
39 }),
40 ),
41 } satisfies MarkerIconDefinition;
42}
43
44function createImageIcon(id: string, label: string, sourcePath: string) {
45 return {

Callers 1

iconRegistry.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected