@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
50 lines (49 loc) • 1.9 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
var _material = require("@mui/material");
var _jsxRuntime = require("react/jsx-runtime");
var _excluded = ["size", "backgroundColor", "colorProgress"];
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 = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
var theme = (0, _material.useTheme)();
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
sx: {
position: 'relative'
},
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, Object.assign({
variant: "determinate",
sx: {
color: backgroundColor || theme.palette.background.paper
},
size: size,
thickness: 4,
value: 100
}, props)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, Object.assign({
variant: "indeterminate",
disableShrink: true,
sx: (0, _defineProperty2["default"])({
color: colorProgress || theme.palette.primary.main,
animationDuration: '950ms',
position: 'absolute',
left: 0,
borderRadius: 1
}, "& .".concat(_material.circularProgressClasses.circle), {
strokeLinecap: 'round'
}),
size: size,
thickness: 4
}, props))]
});
};
var _default = exports["default"] = CircularProgress;