Skip to content

pantoken / packages/core/src / collectIcons

함수: collectIcons()

collectIcons(options?): IconLayer

베타

통합된 InstUI 아이콘 레이어를 수집합니다. 사용자 정의 글리프는 동일한 이름의 Lucide\nglyph보다 우선합니다. 출력은 결정론적 결과를 위해 이름으로 정렬됩니다.

매개변수

options?

CollectIconsOptions = {}

반환값

IconLayer

예제들

모든 글리프와 icon-colour 특수 값을 수집합니다

ts
import { collectIcons } from "@pantoken/core";

const { glyphs, colors } = collectIcons();
// glyphs → IconToken[] (Custom + Lucide, name-sorted)
// colors → [["--instui-icon-color-ai", "…"], ["--instui-icon-color-inherit", "currentColor"]]

Instructure가 작성한 글리프만 허용합니다

ts
import { collectIcons } from "@pantoken/core";

const { glyphs } = collectIcons({ includeLucide: false });
// → only the Custom (Instructure-authored) glyphs