MCPcopy
hub / github.com/simstudioai/sim / getIconColorMap

Function getIconColorMap

apps/sim/blocks/icon-color.ts:17–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15let iconColorByComponent: Map<StyleableIcon, string> | null = null
16
17function getIconColorMap(): Map<StyleableIcon, string> {
18 if (iconColorByComponent) return iconColorByComponent
19 const map = new Map<StyleableIcon, string>()
20 for (const block of getAllBlocks()) {
21 if (block.iconColor) map.set(block.icon, block.iconColor)
22 }
23 iconColorByComponent = map
24 return map
25}
26
27/**
28 * Inline `style` for rendering a brand icon bare (without its colored tile

Callers 1

getBareIconStyleFunction · 0.85

Calls 2

getAllBlocksFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected