All Downloads are FREE. Search and download functionalities are using the official Maven repository.

components.common.TimedLoader.tsx Maven / Gradle / Ivy

import * as React from 'react';

import Box from '@mui/material/Box';
import CircularProgress, { CircularProgressProps } from '@mui/material/CircularProgress';
import Typography from '@mui/material/Typography';

const TimedLoader = () => {
  const [progress, setProgress] = React.useState(10);

  React.useEffect(() => {
    const timer = setInterval(() => {
      setProgress((prevProgress) => (prevProgress >= 100 ? 0 : prevProgress + 10));
    }, 800);
    return () => {
      clearInterval(timer);
    };
  }, []);

  return ;
}

export const CircularProgressWithLabel = (
  props: CircularProgressProps & { value: number, label: string, circleSize: string },
) => {
  const { circleSize: ignore, ...style} = props
  return (
    
      
      
        {props.label}
      
    
  );
}

export default TimedLoader




© 2015 - 2024 Weber Informatics LLC | Privacy Policy