mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
v3.7.2
This commit is contained in:
23
interface/src/components/upload/LinearProgressWithLabel.tsx
Normal file
23
interface/src/components/upload/LinearProgressWithLabel.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
Box,
|
||||
LinearProgress,
|
||||
type LinearProgressProps,
|
||||
Typography
|
||||
} from '@mui/material';
|
||||
|
||||
export function LinearProgressWithLabel(
|
||||
props: LinearProgressProps & { value: number }
|
||||
) {
|
||||
return (
|
||||
<Box sx={{ display: 'flex', alignItems: 'center' }}>
|
||||
<Box sx={{ width: '100%', mr: 1 }}>
|
||||
<LinearProgress variant="determinate" {...props} />
|
||||
</Box>
|
||||
<Box sx={{ minWidth: 35 }}>
|
||||
<Typography variant="body2" color="text.secondary">{`${Math.round(
|
||||
props.value
|
||||
)}%`}</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user