Skip to content

pantoken-root / 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 ​

en lecture seule Token[]

Renvoie ​

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)