File size: 1,434 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
import * as React from 'react';
import Avatar from '@mui/material/Avatar';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import LinearProgress from '@mui/material/LinearProgress';
import Stack from '@mui/material/Stack';
import type { SxProps } from '@mui/material/styles';
import Typography from '@mui/material/Typography';
import { ListBulletsIcon } from '@phosphor-icons/react/dist/ssr/ListBullets';
export interface TasksProgressProps {
sx?: SxProps;
value: number;
}
export function TasksProgress({ value, sx }: TasksProgressProps): React.JSX.Element {
return (
<Card sx={sx}>
<CardContent>
<Stack spacing={2}>
<Stack direction="row" sx={{ alignItems: 'flex-start', justifyContent: 'space-between' }} spacing={3}>
<Stack spacing={1}>
<Typography color="text.secondary" gutterBottom variant="overline">
Task Progress
</Typography>
<Typography variant="h4">{value}%</Typography>
</Stack>
<Avatar sx={{ backgroundColor: 'var(--mui-palette-warning-main)', height: '56px', width: '56px' }}>
<ListBulletsIcon fontSize="var(--icon-fontSize-lg)" />
</Avatar>
</Stack>
<div>
<LinearProgress value={value} variant="determinate" />
</div>
</Stack>
</CardContent>
</Card>
);
}
|