Skip to content

pantoken / packages/core/src / getIconSvgs

Hàm: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Beta

Ánh xạ mọi token biểu tượng sang SVG đã giải mã của nó (khóa theo tên không có tiền tố --instui-icon-).

Tham số

tokens

chỉ đọc Token[]

Trả về

Map<string, string>

Ví dụ

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)