Skip to content

pantoken / packages/core/src / collectIcons

Funksjon: collectIcons()

collectIcons(options?): IconLayer

Beta

Samle det samanslåtte InstUI-ikonlaget. Eigenskapne glyfar har føresegn framfor Lucide-glyfar med same namn. Utdata er sortert etter namn for deterministiske resultat.

Parametrar

options?

CollectIconsOptions = {}

Returnerer

IconLayer

Døme

Samle alle glyfar pluss dei spesielle ikonfarge-verdiane

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

Avgrens til berre glyfar skrive av Instructure

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

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