Created
March 18, 2021 08:51
-
-
Save keremistan/8f9059f7a017c451ebdf964248ab766d to your computer and use it in GitHub Desktop.
A absolute positioning sample where HTML is moved a level higher.
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({ | |
correctSlidersWrapper: { | |
display: 'flex', | |
alignItems: 'center', | |
position: 'relative', | |
'&__rightButton': { | |
position: 'absolute', | |
right: '0', | |
}, | |
'&__leftButton': { | |
position: 'absolute', | |
left: '0', | |
}, | |
} | |
}, {name: 'MuiBlogPost'}); | |
export function SliderButtonsBlogPost() { | |
const classes = useStyles(); | |
return ( | |
<section className={classes.buttonSamplesWrapper}> | |
<h1>Flexed Positions</h1> | |
<div className={`${classes.correctSlidersWrapper}`} > | |
<LeftSliderButton className={`${classes.correctSlidersWrapper}__leftButton`} /> | |
<div className={`${classes.sampleWrapper}`}> | |
{get10RandomColors().map(color => <Color colorName={color} />)} | |
</div> | |
<RightSliderButton className={`${classes.correctSlidersWrapper}__rightButton`} /> | |
</div> | |
</section> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment