@ammarkhalidfarooq/dashboard-package 0.6.60 → 0.6.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +3 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -2
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2086,7 +2086,8 @@ var ProgressBar = function ProgressBar(_ref9) {
|
|
|
2086
2086
|
color = _ref9$color === void 0 ? "rgb(99, 99, 230)" : _ref9$color,
|
|
2087
2087
|
_ref9$height = _ref9.height,
|
|
2088
2088
|
height = _ref9$height === void 0 ? 6 : _ref9$height;
|
|
2089
|
-
var pct = Math.
|
|
2089
|
+
var pct = Math.max(0, Number(value !== null && value !== void 0 ? value : 0));
|
|
2090
|
+
var barWidth = Math.min(100, pct);
|
|
2090
2091
|
return /*#__PURE__*/jsxs("div", {
|
|
2091
2092
|
style: {
|
|
2092
2093
|
display: "flex",
|
|
@@ -2108,7 +2109,7 @@ var ProgressBar = function ProgressBar(_ref9) {
|
|
|
2108
2109
|
},
|
|
2109
2110
|
children: /*#__PURE__*/jsx("div", {
|
|
2110
2111
|
style: {
|
|
2111
|
-
width: "".concat(
|
|
2112
|
+
width: "".concat(barWidth, "%"),
|
|
2112
2113
|
height: "100%",
|
|
2113
2114
|
background: color,
|
|
2114
2115
|
borderRadius: 4
|