File size: 462 Bytes
d378496
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import {
  Box,
  FormControlLabel,
  Slider,
  SliderProps,
  Typography,
} from "@mui/material";

type SliderWithLabelProps = SliderProps & {
  label?: string;
};

export default function SliderWithLabel(props: SliderWithLabelProps) {
  const { label = "", valueLabelDisplay = "auto" } = props;

  return (
    <Box>
      <Typography variant="subtitle1">{label}</Typography>
      <Slider {...props} valueLabelDisplay={valueLabelDisplay} />
    </Box>
  );
}