Skip to content

pantoken / packages/core/src / getIconSvgs

Función: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

Beta

Mapear cada token de icono a su SVG decodificado (indexado por nombre sin el prefijo --instui-icon-).

Parámetros

tokens

solo lectura Token[]

Devuelve

Map<string, string>

Ejemplo

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)