Skip to content

pantoken / packages/core/src / getIconSvgs

함수: getIconSvgs()

getIconSvgs(tokens): Map<string, string>

베타

모든 아이콘 토큰을 디코딩된 SVG에 매핑합니다(키는 --instui-icon- 접두사 없이 이름을 사용).

매개변수

tokens

읽기 전용 Token[]

반환값

Map<string, string>

예제

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)