import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; import Slider from '@material-ui/core/Slider'; import Input from '@material-ui/core/Input'; import VolumeUp from '@material-ui/icons/VolumeUp'; const useStyles = makeStyles({ root: { width: 250, }, input: { width: 42, }, }); export default function InputSlider() { const classes = useStyles(); const [value, setValue] = React.useState>(30); const handleSliderChange = (event: any, newValue: number | number[]) => { setValue(newValue); }; const handleInputChange = (event: React.ChangeEvent) => { setValue(event.target.value === '' ? '' : Number(event.target.value)); }; const handleBlur = () => { if (value < 0) { setValue(0); } else if (value > 100) { setValue(100); } }; return (
Volume
); }