Skip to content

pantoken / packages/core/src / getIconSvgs

Funksjon: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Beta

Kartlegg hver ikontoken til dens dekodede SVG (nøkkel basert på navn uten --instui-icon--prefikset).

Parametere

tokens

readonly Token[]

Returnerer

Map<string, string>

Eksempel

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)