Skip to content

pantoken / packages/core/src / collectIcons

دالة: collectIcons()

collectIcons(options?): IconLayer

بيتا

جمع طبقة أيقونات InstUI الموحدة. تأخذ الرموز المخصصة الأسبقية على رموز Lucide التي تحمل نفس الاسم. يتم فرز الناتج بحسب الاسم للحصول على نتائج حتمية.

المعلمات

options?

CollectIconsOptions = {}

القيم المرجعة

IconLayer

أمثلة

جمع كل الرموز بالإضافة إلى قيم 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"]]

تقييد إلى الرموز التي ألفتها Instructure فقط

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

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