Skip to content

pantoken / packages/core/src / getIconSvgs

Function: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Beta

Map every icon token to its decoded SVG (keyed by name without the --instui-icon- prefix).

Parameters

tokens

readonly Token[]

Returns

Map<string, string>

Example

ts
import { buildTokens, getIconSvgs } from "@pantoken/core";

const svgs = getIconSvgs(buildTokens());
svgs.get("arrow-left"); // → inline SVG markup for the arrow-left glyph (non-icon tokens skipped)