UNPKG

primereact

Version:

PrimeReact is an open source UI library for React featuring a rich set of 90+ 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.27 kB
import*as e from"react";import{ObjectUtils as r,classNames as t}from"primereact/utils";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},n.apply(this,arguments)}var s={defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},getProps:function(e){return r.getMergedProps(e,s.defaultProps)},getOtherProps:function(e){return r.getDiffProps(e,s.defaultProps)}},i=e.memo(e.forwardRef((function(r,i){var o=s.getProps(r),a=e.useRef(null),l=s.getOtherProps(o),p=t("p-progress-spinner",o.className);return e.useImperativeHandle(i,(function(){return{props:o,getElement:function(){return a.current}}})),e.createElement("div",n({id:o.id,ref:a,style:o.style,className:p,role:"alert","aria-busy":!0},l),e.createElement("svg",{className:"p-progress-spinner-svg",viewBox:"25 25 50 50",style:{animationDuration:o.animationDuration}},e.createElement("circle",{className:"p-progress-spinner-circle",cx:"50",cy:"50",r:"20",fill:o.fill,strokeWidth:o.strokeWidth,strokeMiterlimit:"10"})))})));i.displayName="ProgressSpinner";export{i as ProgressSpinner};