@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) • 967 B
JavaScript
import{jsx as r,jsxs as e}from"react/jsx-runtime";import a from"@mui/material/Backdrop";import i from"@mui/material/Typography";import t from"@mui/material/CircularProgress";import o from"@mui/material/Stack";const n="NexusLoadingPanel",s=s=>{const{open:l=!1,loader:m,loadingTitle:d,loadingMessage:c,sx:g,...p}=s,h="string"==typeof d?r(i,{color:"inherit","data-testid":`${n}-loadingTitle`,variant:"h4",className:`${n}-loadingTitle`,children:d}):d,u="string"==typeof c?r(i,{color:"inherit","data-testid":`${n}-loadingMessage`,variant:"body1",className:`${n}-loadingMessage`,children:c}):c;return r(a,{open:l,"data-testid":`${n}-root`,...p,className:`${n}-root`,sx:[{color:"common.white",zIndex:r=>r.zIndex.drawer+1},...Array.isArray(g)?g:[g]],children:e(o,{direction:"column",justifyContent:"center",alignItems:"center",spacing:2,children:[m||r(t,{color:"inherit","data-testid":`${n}-progress`,className:`${n}-progress`}),h,u]})})};export{s as LoadingPanelComponent};