MCPcopy
hub / github.com/figma/plugin-samples / processSVG

Function processSVG

svg-inserter/code.ts:12–14  ·  view source on GitHub ↗
({icon, color, size}: {icon: string, color: string, size: string})

Source from the content-addressed store, hash-verified

10}, {})
11
12function processSVG({icon, color, size}: {icon: string, color: string, size: string}): string {
13 return icon.replace(/\$size\$/g, size).replace(/\$color\$/g, color)
14}
15
16// The 'input' event listens for text change in the Quick Actions box after a plugin is 'Tabbed' into.
17figma.parameters.on('input', ({key, query, parameters, result}: ParameterInputEvent) => {

Callers 2

code.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected