ohif-viewer/platform/ui-next/src/components/LoadingIndicatorProgress/LoadingIndicatorProgress.tsx
Alireza 2bdf4afa4d
refactor(ui): Migrate components to ui-next (#4930)
Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
2025-04-08 12:06:07 -04:00

30 lines
897 B
TypeScript

import React from 'react';
import classNames from 'classnames';
import ProgressLoadingBar from '../ProgressLoadingBar';
import { Icons } from '../Icons';
/**
* A React component that renders a loading indicator.
* if progress is not provided, it will render an infinite loading indicator
* if progress is provided, it will render a progress bar
* Optionally a textBlock can be provided to display a message
*/
function LoadingIndicatorProgress({ className, textBlock, progress }) {
return (
<div
className={classNames(
'absolute top-0 left-0 z-50 flex flex-col items-center justify-center space-y-5',
className
)}
>
<Icons.LoadingOHIFMark className="h-12 w-12 text-white" />
<div className="w-48">
<ProgressLoadingBar progress={progress} />
</div>
{textBlock}
</div>
);
}
export default LoadingIndicatorProgress;