UNPKG

primereact

Version:

PrimeReact is an open source UI library for React featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with Prime

2 lines (1 loc) 1.37 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(e);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}var a=n.memo(n.forwardRef((function(e,r){var s=n.useRef(null),l=t.ObjectUtils.findDiffKeys(e,a.defaultProps),o=e.size?{width:e.size,height:e.size,borderRadius:e.borderRadius}:{width:e.width,height:e.height,borderRadius:e.borderRadius},u=t.classNames("p-skeleton p-component",{"p-skeleton-circle":"circle"===e.shape,"p-skeleton-none":"none"===e.animation},e.className);return n.useImperativeHandle(r,(function(){return{props:e,getElement:function(){return s.current}}})),n.createElement("div",i({ref:s,style:o,className:u},l))})));a.displayName="Skeleton",a.defaultProps={__TYPE:"Skeleton",shape:"rectangle",size:null,width:"100%",height:"1rem",borderRadius:null,animation:"wave",style:null,className:null},exports.Skeleton=a;