Skip to content

pantoken-root / packages/core/src / getIconSvgs

Funkcja: getIconSvgs() ​

getIconSvgs(tokens): Map<string, string>

Beta

Zmapuj każdy token ikony na jego zdekodowane SVG (kluczowane według nazwy bez prefiksu --instui-icon-).

Parametry ​

tokens ​

tylko do odczytu Token[]

Zwraca ​

Map<string, string>

Przykład ​

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)