synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
80 lines (79 loc) • 1.68 kB
JavaScript
import { jsxs as s, jsx as r } from "react/jsx-runtime";
import { useState as m, useEffect as B } from "react";
import { LinearProgress as h, Box as C, Button as c } from "@mui/material";
function w(l) {
const {
barColor: d,
barPercent: e,
backBtnLabel: x,
forwardBtnLabel: p,
forwardBtnActive: t,
backBtnCallback: n,
forwardBtnCallback: o
} = l, [u, g] = m(0);
let a = !0;
B(() => (a && g(e), () => {
a = !1;
}), [e]);
const f = (k) => {
n && n();
}, b = (k) => {
o && t && o();
}, i = {
padding: "10px 120px",
marginRight: "30px"
};
return /* @__PURE__ */ s("section", { children: [
/* @__PURE__ */ r(
h,
{
value: u,
variant: "determinate",
sx: {
backgroundColor: "transparent",
"& .MuiLinearProgress-bar": {
backgroundColor: d
},
height: "10px"
}
}
),
/* @__PURE__ */ s(
C,
{
sx: {
padding: "30px 0",
textAlign: "center"
},
children: [
/* @__PURE__ */ r(
c,
{
onClick: f,
sx: i,
variant: "outlined",
color: "primary",
children: x
}
),
/* @__PURE__ */ r(
c,
{
onClick: b,
disabled: !t,
sx: i,
variant: "contained",
color: "primary",
children: p
}
)
]
}
)
] });
}
export {
w as PageProgress,
w as default
};
//# sourceMappingURL=PageProgress.js.map