Skip to content

pantoken / custom-icons

custom-icons

เบต้า

@pantoken/plugin-custom-icons — กำหนดสัญลักษณ์ไอคอนแบบกำหนดเองที่รวมไว้ในแพ็กเกจสำหรับผู้บริโภคปลายน้ำ.

Brings in icons that aren't part of the InstUI set (product/brand marks, etc.) as --instui-icon-<name> image tokens — the same namespace and .-icon-<name> painter class the built-in InstUI icons use, so a custom icon drops into .instui-icon -icon-<name> exactly like a built-in one. No custom- prefix: on a name collision, the built-in InstUI icon should win (load it after this plugin's CSS in any combine URL).

ตัวอย่าง

ts
import { toCss } from "@pantoken/css";
import { byTheme } from "@pantoken/tokens";
import { customIcons } from "@pantoken/plugin-custom-icons";

const css = toCss(byTheme("rebrand"), { plugins: [customIcons({ names: ["highspot"] })] });
// adds --instui-icon-highspot as an <image> token

อินเทอร์เฟซ

ตัวแปร

ฟังก์ชัน

การอ้างอิง

default

เปลี่ยนชื่อและส่งออกซ้ำ customIcons