Skip to content

pantoken / packages/core/src / collectIcons

Funktio: collectIcons()

collectIcons(options?): IconLayer

Beta

Kerää yhdistetty InstUI-kuvaketaso. Mukautetut glyfit menevät etusijalle saman nimisten Lucide-glyfien yli. Tuloste on lajiteltu nimen mukaan determinististen tulosten saamiseksi.

Parametrit

options?

CollectIconsOptions = {}

Palauttaa

IconLayer

Esimerkit

Kerää jokainen glyfi sekä kuvakkeen värin erityisarvot

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

Rajoita vain Instructuren kirjoittamiin glyfeihin

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

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