-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
425 additions
and
105 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import Slider from '@mui/material/Slider'; | ||
|
||
const marks = [ | ||
{ | ||
value: 0, | ||
label: '0%', | ||
}, | ||
{ | ||
value: 25, | ||
label: '25%', | ||
}, | ||
{ | ||
value: 50, | ||
label: '50%', | ||
}, | ||
{ | ||
value: 75, | ||
label: '75%', | ||
}, | ||
{ | ||
value: 100, | ||
label: '100%', | ||
}, | ||
]; | ||
|
||
function valuetext(value) { | ||
return `${value}%`; | ||
} | ||
|
||
export default function BalanceSlider() { | ||
return ( | ||
<Box sx={{ width: 350, margin: "0 auto 10px auto" }}> | ||
<Slider | ||
aria-label="Restricted values" | ||
defaultValue={0} | ||
getAriaValueText={valuetext} | ||
step={null} | ||
valueLabelDisplay="auto" | ||
marks={marks} | ||
/> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.