Skip to content

pantoken / packages/core/src / getIconSvgs

Ֆունկցիա: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Բետա

Map յուրաքանչյուր icon token իր decoded SVG-ի հետ (բանալու անվամբ առանց --instui-icon- prefix-ի):

Պարամետրեր

tokens

միայն ընթերցման Token[]

Վերադարձվող արժեք

Map<string, string>

Օրինակ

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)