UNPKG

@hugeicons/react

Version:

Hugeicons React Component Library https://hugeicons.com

3 lines (2 loc) 1.15 kB
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).HugeiconsReact={},e.React)}(this,function(e,o){"use strict";const t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},i=o.forwardRef(({color:e="currentColor",size:i=24,strokeWidth:r,absoluteStrokeWidth:c=!1,className:n="",altIcon:s,showAlt:a=!1,icon:d,primaryColor:l,secondaryColor:f,disableSecondaryOpacity:u=!1,...p},y)=>{const h=void 0!==r?c?24*Number(r)/Number(i):r:void 0,m=void 0!==h?{strokeWidth:h,stroke:"currentColor"}:{},v={ref:y,...t,width:i,height:i,color:l||e,className:n,...m,...p},g=[...a&&s?s:d].sort(([,e],[,o])=>void 0!==o.opacity?1:void 0!==e.opacity?-1:0).map(([t,i])=>{const r=void 0!==i.opacity,c=r&&!u?i.opacity:void 0,n=f?{...void 0!==i.stroke?{stroke:r?f:l||e}:{fill:r?f:l||e}}:{};return o.createElement(t,{...i,...m,...n,opacity:c,key:i.key})});return o.createElement("svg",v,g)});i.displayName="HugeiconsIcon",e.HugeiconsIcon=i}); //# sourceMappingURL=index.js.map