Files
Doormilexpress_app/src/components/@extended/progress/LinearWithLabel.js
Malai Raja 7113ac0681 first
2023-11-27 17:09:27 +05:30

24 lines
705 B
JavaScript

import PropTypes from 'prop-types';
// material-ui
import { Box, LinearProgress, Typography } from '@mui/material';
// ==============================|| PROGRESS - LINEAR WITH LABEL ||============================== //
export default function LinearWithLabel({ value, ...others }) {
return (
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Box sx={{ width: '100%', mr: 1 }}>
<LinearProgress variant="determinate" value={value} {...others} />
</Box>
<Box sx={{ minWidth: 35 }}>
<Typography variant="body2" color="text.secondary">{`${Math.round(value)}%`}</Typography>
</Box>
</Box>
);
}
LinearWithLabel.propTypes = {
value: PropTypes.number
};