nextjs-hf-spaces / src /components /base /slider-with-label.tsx
NERDDISCO's picture
feat: added base components, updated the readme, extended summarization
d378496
raw
history blame contribute delete
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>
);
}