@solar-icons/react
Version:
Solar Icons for React
54 lines (53 loc) • 1.59 kB
JavaScript
var I = Object.defineProperty;
var l = Object.getOwnPropertySymbols;
var d = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
var m = (e, t, r) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, s = (e, t) => {
for (var r in t || (t = {}))
d.call(t, r) && m(e, r, t[r]);
if (l)
for (var r of l(t))
f.call(t, r) && m(e, r, t[r]);
return e;
};
var g = (e, t) => {
var r = {};
for (var o in e)
d.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
if (e != null && l)
for (var o of l(e))
t.indexOf(o) < 0 && f.call(e, o) && (r[o] = e[o]);
return r;
};
import w, { forwardRef as P } from "react";
import { useSolar as R } from "./context.mjs";
const S = P((e, t) => {
const i = e, { alt: r, color: o, size: n, weight: a, mirrored: h, children: p, weights: x } = i, u = g(i, ["alt", "color", "size", "weight", "mirrored", "children", "weights"]), {
value: {
color: v = "currentColor",
size: c,
weight: B = "Linear",
mirrored: C = !1
},
svgProps: E
} = R();
return /* @__PURE__ */ w.createElement(
"svg",
s(s({
ref: t,
xmlns: "http://www.w3.org/2000/svg",
width: n != null ? n : c,
height: n != null ? n : c,
color: o != null ? o : v,
fill: "none",
viewBox: "0 0 24 24",
transform: h || C ? "scale(-1, 1)" : void 0
}, E), u),
!!r && /* @__PURE__ */ w.createElement("title", null, r),
p,
x.get(a != null ? a : B)
);
});
S.displayName = "IconBase";
export {
S as default
};