Skip to content

Commit

Permalink
fix warning on toggle click
Browse files Browse the repository at this point in the history
  • Loading branch information
benny-n committed Apr 2, 2022
1 parent 5acc94a commit 7545c5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import { Tooltip } from "@mui/material";
import Box from "@mui/material/Box";
import LinearProgress, {
linearProgressClasses,
LinearProgressProps,
} from "@mui/material/LinearProgress";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import { styled, useTheme } from "@mui/material/styles";
import { Tooltip } from "@mui/material";
import Typography from "@mui/material/Typography";

export const LinearProgressMultiColorWithLabel = (
props: LinearProgressProps & {
onlyCompleteProgress: number;
totalProgress: number;
}
) => {
export const LinearProgressMultiColorWithLabel = (props: {
onlyCompleteProgress: number;
totalProgress: number;
}) => {
const theme = useTheme();
const MultiColorLinearProgress = styled(LinearProgress)(({ theme }) => ({
[`& .${linearProgressClasses.dashed}`]: {
Expand Down Expand Up @@ -41,7 +38,6 @@ export const LinearProgressMultiColorWithLabel = (
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
<Box sx={{ width: "100%" }}>
<MultiColorLinearProgress
{...props}
variant="buffer"
valueBuffer={props.totalProgress}
value={props.onlyCompleteProgress}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import Box from "@mui/material/Box";
import LinearProgress, {
linearProgressClasses,
LinearProgressProps,
} from "@mui/material/LinearProgress";
import { useTheme } from "@mui/material/styles";
import Typography from "@mui/material/Typography";

export const LinearProgressWithLabel = (
props: LinearProgressProps & { value: number }
) => {
export const LinearProgressWithLabel = (props: { value: number }) => {
const theme = useTheme();

return (
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
<Box sx={{ width: "100%" }}>
<LinearProgress
{...props}
value={props.value}
variant="determinate"
sx={{
backgroundColor: "rgba(0, 0, 0, 0.178)",
Expand Down

0 comments on commit 7545c5b

Please sign in to comment.