UNPKG

@frontify/fondue-icons

Version:
55 lines (54 loc) 1.45 kB
import { forwardRef as m, createElement as S } from "react"; import { defaultAttributes as p } from "./fondue-icons350.js"; import { htmlKeysToJsxKeys as y } from "./fondue-icons351.js"; import { kebabCase as s } from "./fondue-icons352.js"; var $ = /* @__PURE__ */ ((e) => (e.Size12 = "Size12", e.Size16 = "Size16", e.Size20 = "Size20", e.Size24 = "Size24", e.Size32 = "Size32", e))($ || {}); const u = { Size12: 12, Size16: 16, Size20: 20, Size24: 24, Size32: 32, 12: 12, 16: 16, 20: 20, 24: 24, 32: 32 }, z = (e, t) => e.map( ([r, i, o]) => S( r, { key: `${t}-${r}`, ...i ? y(i) : {} }, Array.isArray(o) && o.length > 0 ? o.map((n) => z([n], `${t}-${r}`)) : [] ) ), C = (e, t) => { const r = m( ({ color: i = "currentColor", size: o = 24, className: n = "", children: f, ...a }, d) => S( "svg", { ref: d, ...p, color: i, width: u[o], height: u[o], className: ["fondue", `fondue-${s(e)}`, n].filter(Boolean).join(" "), "data-test-id": `fondue-icons-${s(e)}`, key: `fondue-icons-${s(e)}`, ...a }, [ ...z(t, s(e)), // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment ...Array.isArray(f) ? f : [f] ] ) ); return r.displayName = `Icon${e}`, r; }; export { $ as IconSize, C as createFondueIcon }; //# sourceMappingURL=fondue-icons2.js.map