Skip to content

pantoken-root / packages/core/src / getIconSvgs

Fall: getIconSvgs() ​

getIconSvgs(tokens): Map<string, string>

Beta

Kortleggðu hvert icon token við afkóðaða SVG (lyklað eftir nafni án --instui-icon- forskeytis).

Færibreytur ​

tokens ​

aðeins-lesa Token[]

Skilar ​

Map<string, string>

Dæmi ​

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)