Skip to content

pantoken / packages/core/src / getIconSvgs

Swyddogaeth: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Bêta

Mapio pob tocyn eicon i'w SVG wedi'i ddatgodi (gan ddefnyddio'r enw heb y rhagddodiad --instui-icon-).

Paramedrau

tokens

readonly Token[]

Yn dychwelyd

Map<string, string>

Enghraifft

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)