79493247

Date: 2025-03-07 19:00:42
Score: 0.5
Natty:
Report link

I found a workarround using Box and setting the color on LinearProgress to inherit:

import { Box, LinearProgress } from '@mui/material';

export default function ProgressBar() {
  return (
    <Box color="progress.501">
      <LinearProgress
        variant="determinate"
        value={50}
        color="inherit"
        sx={{
          height: 8,
          width: 120,
        }}
      />
    </Box\>
  );
}

However, I wonder if there's a way to make it work like it does in Typography, i.e., without needing an extra Box component.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Renan Elfo