Skip to content

Instantly share code, notes, and snippets.

@mjyoung
Last active July 13, 2023 02:54
Show Gist options
  • Save mjyoung/c10ed08eefcf2e1d5afc to your computer and use it in GitHub Desktop.
Save mjyoung/c10ed08eefcf2e1d5afc to your computer and use it in GitHub Desktop.
rackt/react-modal override default styles to use flexbox for modal positioning
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