UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

2 lines (1 loc) 1.17 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@mui/material/Backdrop"),a=require("@mui/material/Typography"),t=require("@mui/material/CircularProgress"),i=require("@mui/material/Stack");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(r),n=o(a),l=o(t),d=o(i);const c="NexusLoadingPanel";exports.LoadingPanelComponent=r=>{const{open:a=!1,loader:t,loadingTitle:i,loadingMessage:o,sx:u,...g}=r,m="string"==typeof i?e.jsx(n.default,{color:"inherit","data-testid":`${c}-loadingTitle`,variant:"h4",className:`${c}-loadingTitle`,children:i}):i,p="string"==typeof o?e.jsx(n.default,{color:"inherit","data-testid":`${c}-loadingMessage`,variant:"body1",className:`${c}-loadingMessage`,children:o}):o;return e.jsx(s.default,{open:a,"data-testid":`${c}-root`,...g,className:`${c}-root`,sx:[{color:"common.white",zIndex:e=>e.zIndex.drawer+1},...Array.isArray(u)?u:[u]],children:e.jsxs(d.default,{direction:"column",justifyContent:"center",alignItems:"center",spacing:2,children:[t||e.jsx(l.default,{color:"inherit","data-testid":`${c}-progress`,className:`${c}-progress`}),m,p]})})};