UNPKG

spinners-react

Version:

Lightweight SVG/CSS spinners for React

3 lines (2 loc) 1.42 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SpinnersReact={},e.React)}(this,(function(e,t){"use strict";var r=function(){return r=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},r.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var o={color:"#38ad48",enabled:!0,size:50,style:{}},n=function(e){return parseFloat(e.toString()).toString()===e.toString()?"".concat(e,"px"):e.toString()};e.withSharedProps=function(e){return function(i){var l=i.color,c=void 0===l?o.color:l,s=i.enabled,a=void 0===s?o.enabled:s,f=i.size,p=void 0===f?o.size:f,u=i.style,d=void 0===u?o.style:u,y=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}(i,["color","enabled","size","style"]),b=r(r({},y),{style:r({color:c,overflow:"visible",width:n(p)},d)});return a?t.createElement(e,r({},b)):null}}})); //# sourceMappingURL=withSharedProps.min.js.map