Skip to content

pantoken-root / packages/core/src / getIconSvgs

Funció: getIconSvgs() ​

getIconSvgs(tokens): Map<string, string>

Beta

Mapeja cada token d'icona al seu SVG descodificat (indexat per nom sense el prefix --instui-icon-).

Paràmetres ​

tokens ​

només de lectura Token[]

Retorna ​

Map<string, string>

Exemple ​

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

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