Last active
July 13, 2023 02:54
-
-
Save mjyoung/c10ed08eefcf2e1d5afc to your computer and use it in GitHub Desktop.
rackt/react-modal override default styles to use flexbox for modal positioning
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 modalCustomStyles = { | |
overlay : { | |
position : 'fixed', | |
top : 0, | |
left : 0, | |
right : 0, | |
bottom : 0, | |
display : 'flex', | |
alignItems : 'center', | |
justifyContent : 'center', | |
backgroundColor : 'rgba(90,98,107,.9)' | |
}, | |
content : { | |
position : 'null', // to override default styles | |
top : 'null', | |
left : 'null', | |
right : 'null', | |
bottom : 'null', | |
border : '2px solid #5B6675', | |
background : '#fff', | |
padding : '28px 15px', | |
maxWidth : '560px', | |
minWidth : '400px', | |
height : '75vh' | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment