Skip to content

pantoken-root / packages/core/src / getIconSvgs

Função: getIconSvgs() ​

getIconSvgs(tokens): Map<string, string>

Beta

Mapeie cada token de ícone para seu SVG decodificado (indexado pelo nome sem o prefixo --instui-icon-).

Parâmetros ​

tokens ​

somente leitura Token[]

Retorna ​

Map<string, string>

Exemplo ​

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)