here.chat / src /components /base /slider-with-label.tsx
faranbutt789's picture
Pushing Frontend Code
8e40013
raw
history blame
462 Bytes
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>
);
}