Skip to content

pantoken / packages/core/src / getIconSvgs

Funkcija: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Beta

Preslikaj vsak ikonni žeton v njegov dekodiran SVG (ključeno po imenu brez predpone --instui-icon-).

Parametri

tokens

readonly Token[]

Vrne

Map<string, string>

Primer

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)