Skip to content

pantoken / packages/core/src / collectIcons

Funktion: collectIcons()

collectIcons(options?): IconLayer

Beta

Samla det enhetliga InstUI-ikonskiktet. Anpassade glyfer har företräde framför Lucide-glyfer med samma namn. Utdata sorteras efter namn för deterministiska resultat.

Parametrar

options?

CollectIconsOptions = {}

Returnerar

IconLayer

Exempel

Samla varje glyf plus de speciala värdena för ikonfärg

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"]]

Begränsa till endast glyfer som författats av Instructure

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

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