Skip to content

pantoken-root / packages/core/src / collectIcons

دالة: collectIcons() ​

collectIcons(options?): IconLayer

Beta

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

Parameters ​

options? ​

CollectIconsOptions = {}

Returns ​

IconLayer

Examples ​

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