Created
March 18, 2021 08:47
-
-
Save keremistan/518258c42c33b59bb0d8386c63bc3c0d to your computer and use it in GitHub Desktop.
A sample where fixed positioning is used.
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
const useStyles = makeStyles({ | |
fixedToPageWrapper: { | |
position: 'relative', | |
'&__rightButton': { | |
position: 'fixed', | |
right: 0, | |
}, | |
'&__leftButton': { | |
position: 'fixed', | |
left: 0, | |
}, | |
}, | |
}, {name: 'MuiBlogPost'}); | |
export function SliderButtonsBlogPost() { | |
const classes = useStyles(); | |
return ( | |
<section className={classes.buttonSamplesWrapper}> | |
<h1>Fixed Positions</h1> | |
<div className={`${classes.fixedToPageWrapper} ${classes.sampleWrapper}`}> | |
<LeftSliderButton className={`${classes.fixedToPageWrapper}__leftButton`} /> | |
{get10RandomColors().map(color => <Color colorName={color} />)} | |
<RightSliderButton className={`${classes.fixedToPageWrapper}__rightButton`} /> | |
</div> | |
</section> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment