Skip to content

pantoken / packages/core/src / getIconSvgs

Funktion: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Beta

Kartlägg varje ikon-token till dess avkodade SVG (indexerat efter namn utan --instui-icon--prefix).

Parametrar

tokens

skrivskyddad Token[]

Returnerar

Map<string, string>

Exempel

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)