Skip to content

pantoken / packages/core/src / collectIcons

Funkcja: collectIcons()

collectIcons(options?): IconLayer

Beta

Zbierz zunifikowaną warstwę ikon InstUI. Niestandardowe glify mają pierwszeństwo przed glifami Lucide o tej samej nazwie. Wynik jest sortowany według nazwy dla deterministycznych rezultatów.

Parametry

options?

CollectIconsOptions = {}

Zwraca

IconLayer

Przykłady

Zbierz każdy glif oraz specjalne wartości kolorów ikon

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

Ogranicz tylko do glifów autorstwa Instructure

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

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