Skip to content

pantoken / packages/core/src / collectIcons

Swyddogaeth: collectIcons()

collectIcons(options?): IconLayer

Bêta

Casglu haen eicon InstUI unedig. Mae glyffau wedi'u teilwra yn cael blaenoriaeth dros glyffau Lucide o'r un enw. Mae'r allbwn wedi'i drefnu yn ôl enw ar gyfer canlyniadau pendant.

Paramedrau

options?

CollectIconsOptions = {}

Yn dychwelyd

IconLayer

Enghreifftiau

Casglu pob glyff yn ogystal â'r gwerthoedd arbennig 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"]]

Cyfyngu i glyffau a awdurwyd gan Instructure yn unig

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

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