Skip to content

pantoken-root / packages/core/src / getIconSvgs

Függvény: getIconSvgs() ​

getIconSvgs(tokens): Map<string, string>

Béta

Képezze le az egyes ikon tokeneket dekódolt SVG-jükre (a --instui-icon- előtag nélkül név alapján).

Paraméterek ​

tokens ​

csak olvasható Token[]

Visszatérési érték ​

Map<string, string>

Példa ​

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)