Skip to content

pantoken-root / packages/core/src / getIconSvgs

Functie: getIconSvgs() ​

getIconSvgs(tokens): Map<string, string>

Bèta

Koppel elk icoontoken aan de gedecodeerde SVG (geïndexeerd op naam zonder het --instui-icon--voorvoegsel).

Parameters ​

tokens ​

alleen-lezen Token[]

Retourneert ​

Map<string, string>

Voorbeeld ​

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)