Skip to content

pantoken / packages/core/src / getIconSvgs

Funktion: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Beta

Ordnet jeden Icon-Token seiner decodierten SVG zu (indiziert nach Namen ohne das --instui-icon--Präfix).

Parameter

tokens

schreibgeschützt Token[]

Rückgabe

Map<string, string>

Beispiel

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)