parent
16cac55ec0
commit
db4037dd07
15 changed files with 351 additions and 169 deletions
@ -0,0 +1,59 @@ |
||||
import React from 'react' |
||||
import { withStyles, makeStyles } from '@material-ui/core/styles' |
||||
import Slider from '@material-ui/core/Slider' |
||||
const useStyles = makeStyles((theme) => ({ |
||||
root: { |
||||
width: 500 + theme.spacing(0), |
||||
}, |
||||
margin: { |
||||
height: theme.spacing(3), |
||||
}, |
||||
})) |
||||
|
||||
const PrettoSlider = withStyles({ |
||||
root: { |
||||
color: '#009AA8', |
||||
height: '5px', |
||||
padding: 0, |
||||
direction: 'rtl !important', |
||||
}, |
||||
thumb: { |
||||
height: '15px', |
||||
width: '15px', |
||||
backgroundColor: '#fff', |
||||
border: '1.5px solid currentColor', |
||||
marginTop: '-6px', |
||||
marginLeft: '-11px', |
||||
direction: 'rtl !important', |
||||
'&:focus, &:hover, &$active': { |
||||
boxShadow: 'inherit', |
||||
direction: 'rtl !important', |
||||
}, |
||||
}, |
||||
active: {}, |
||||
track: { |
||||
height: '5px', |
||||
borderRadius: 4, |
||||
direction: 'rtl !important', |
||||
}, |
||||
rail: { |
||||
height: '5px', |
||||
borderRadius: 4, |
||||
}, |
||||
})(Slider) |
||||
|
||||
export default function ProgressBar(props) { |
||||
const classes = useStyles() |
||||
const { CountPage } = props; |
||||
return ( |
||||
<div className={classes.root}> |
||||
<PrettoSlider |
||||
track="inverted" |
||||
value={CountPage} |
||||
max={100} |
||||
min={1} |
||||
marks={true} |
||||
/> |
||||
</div> |
||||
) |
||||
} |
Loading…
Reference in new issue