UNPKG

flaming-icons

Version:

Complete icon library with tree-shaking support for Vue and Vuetify

38 lines (37 loc) 1.18 kB
import { h as o } from "vue"; function m(l) { const i = /* @__PURE__ */ new Map(); return l.forEach((t) => { var e; i.set(t.name, t), (e = t.aliases) == null || e.forEach((n) => { i.set(n, t); }); }), { component: (t) => { var a; const e = (a = t.icon) != null && a.startsWith("flaming:") ? t.icon.substring(8) : t.icon; if (!e) return console.warn(`Invalid icon name: ${t.icon}`), null; const n = i.get(e); if (!n) return console.warn(`Icon "${e}" not found. Available icons: ${Array.from(i.keys()).join(", ")}`), null; const [c, r, s, h] = n.viewBox, f = Array.isArray(n.path) ? n.path.join(" ") : n.path; return o("svg", { viewBox: `${c} ${r} ${s} ${h}`, style: { width: t.size || "24px", height: t.size || "24px", fill: t.color || "currentColor", ...t.style }, class: ["flaming-icon", t.class].filter(Boolean).join(" "), "aria-hidden": !t.title, "aria-label": t.title, role: t.title ? "img" : "presentation" }, [o("path", { d: f })]); } }; } export { m as createVuetifyIconSet };