Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
26 lines
567 B
TypeScript
26 lines
567 B
TypeScript
import Box from '@mui/material/Box';
|
|
import Slider from '@mui/material/Slider';
|
|
|
|
function valuetext(value: number) {
|
|
return `${value}°C`;
|
|
}
|
|
|
|
export default function DiscreteSlider() {
|
|
return (
|
|
<Box sx={{ width: 300 }}>
|
|
<Slider
|
|
aria-label="Temperature"
|
|
defaultValue={30}
|
|
getAriaValueText={valuetext}
|
|
valueLabelDisplay="auto"
|
|
shiftStep={30}
|
|
step={10}
|
|
marks
|
|
min={10}
|
|
max={110}
|
|
/>
|
|
<Slider defaultValue={30} step={10} marks min={10} max={110} disabled />
|
|
</Box>
|
|
);
|
|
}
|