@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
43 lines • 1.56 kB
JavaScript
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["size", "backgroundColor", "colorProgress"];
import React from 'react';
import { Box, CircularProgress as WSCircularProgress, circularProgressClasses, useTheme } from '@mui/material';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var CircularProgress = function CircularProgress(_ref) {
var _ref$size = _ref.size,
size = _ref$size === void 0 ? 40 : _ref$size,
backgroundColor = _ref.backgroundColor,
colorProgress = _ref.colorProgress,
props = _objectWithoutProperties(_ref, _excluded);
var theme = useTheme();
return /*#__PURE__*/_jsxs(Box, {
sx: {
position: 'relative'
},
children: [/*#__PURE__*/_jsx(WSCircularProgress, Object.assign({
variant: "determinate",
sx: {
color: backgroundColor || theme.palette.background.paper
},
size: size,
thickness: 4,
value: 100
}, props)), /*#__PURE__*/_jsx(WSCircularProgress, Object.assign({
variant: "indeterminate",
disableShrink: true,
sx: _defineProperty({
color: colorProgress || theme.palette.primary.main,
animationDuration: '950ms',
position: 'absolute',
left: 0,
borderRadius: 1
}, "& .".concat(circularProgressClasses.circle), {
strokeLinecap: 'round'
}),
size: size,
thickness: 4
}, props))]
});
};
export default CircularProgress;