Skip to content

pantoken / packages/core/src / collectIcons

関数: collectIcons()

collectIcons(options?): IconLayer

ベータ

統合された InstUI アイコンレイヤーを収集します。カスタムグリフは同名の Lucide\nglyphs より優先されます。出力は決定論的な結果のために名前順にソートされます。

パラメーター

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