import * as React from 'react';
import PropTypes from 'prop-types';
import LinearProgress from '@mui/material/LinearProgress';
import Typography from '@mui/material/Typography';
import Box from '@mui/material/Box';
function LinearProgressWithLabelAndValue(props) {
const progressId = React.useId();
return (
Uploading photos…
{`${Math.round(props.value)}%`}
);
}
LinearProgressWithLabelAndValue.propTypes = {
/**
* The value of the progress indicator for the determinate and buffer variants.
* Value between `min` and `max`.
*/
value: PropTypes.number.isRequired,
};
export default function LinearWithValueLabel() {
const [progress, setProgress] = React.useState(10);
React.useEffect(() => {
const timer = setInterval(() => {
setProgress((prevProgress) => (prevProgress >= 100 ? 10 : prevProgress + 10));
}, 800);
return () => {
clearInterval(timer);
};
}, []);
return (
);
}