react-vegas
Version:
Vegas.js for React
42 lines (41 loc) • 1.59 kB
JavaScript
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
const VegasLoader = ({ loadProgress })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
style: {
position: "absolute",
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
textAlign: "center",
color: "#fff",
zIndex: 10,
backgroundColor: "rgba(0,0,0,0.5)",
padding: "20px",
borderRadius: "8px"
},
children: [
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
children: [
"加载中... ",
loadProgress,
"%"
]
}),
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
style: {
width: "200px",
height: "5px",
backgroundColor: "rgba(255,255,255,0.3)",
marginTop: "10px"
},
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
style: {
width: `${loadProgress}%`,
height: "100%",
backgroundColor: "#fff",
transition: "width 0.3s"
}
})
})
]
});
export { VegasLoader };