File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,12 @@ export default class ModalsPage extends React.Component {
4949 PropTypes.bool,
5050 PropTypes.oneOf(['static'])
5151 ]),
52- keyboard: PropTypes.bool
52+ keyboard: PropTypes.bool,
53+ // zIndex defaults to 1000.
54+ zIndex: PropTypes.oneOfType([
55+ PropTypes.number,
56+ PropTypes.string,
57+ ]),
5358}` }
5459 </ PrismCode >
5560 </ pre >
Original file line number Diff line number Diff line change @@ -24,12 +24,17 @@ const propTypes = {
2424 children : PropTypes . node ,
2525 className : PropTypes . string ,
2626 cssModule : PropTypes . object ,
27+ zIndex : PropTypes . oneOfType ( [
28+ PropTypes . number ,
29+ PropTypes . string ,
30+ ] ) ,
2731} ;
2832
2933const defaultProps = {
3034 isOpen : false ,
3135 backdrop : true ,
32- keyboard : true
36+ keyboard : true ,
37+ zIndex : 1000 ,
3338} ;
3439
3540class Modal extends React . Component {
@@ -126,7 +131,7 @@ class Modal extends React.Component {
126131 this . _element = document . createElement ( 'div' ) ;
127132 this . _element . setAttribute ( 'tabindex' , '-1' ) ;
128133 this . _element . style . position = 'relative' ;
129- this . _element . style . zIndex = '1000' ;
134+ this . _element . style . zIndex = this . props . zIndex ;
130135 this . originalBodyPadding = getOriginalBodyPadding ( ) ;
131136
132137 conditionallyUpdateScrollbar ( ) ;
You can’t perform that action at this time.
0 commit comments