Skip to content

pantoken / packages/core/src / getIconSvgs

Fonction: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Bêta

Associer chaque jeton d'icône à son SVG décodé (indexé par le nom sans le préfixe --instui-icon-).

Paramètres

tokens

lecture seule Token[]

Retourne

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)