Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
bsSize: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
// When 'true' the modal will show itself.
show: PropTypes.bool,
// Specify 'static' for a backdrop that doesn't trigger an "onHide" when clicked.
backdrop: PropTypes.oneOf(['static', true, false]),
// Specify whether the Component should contain a close button
closeButton: PropTypes.bool,
// A callback fired when the header closeButton or non-static backdrop is clicked.
onHide: PropTypes.func
};
static defaultProps = {
...ModalOverlay.defaultProps,
bsSize: 'xs',
show: true,
backdrop: 'static',
closeButton: true,
onHide: noop
};
style = {
overflowY: ''
};
componentDidMount() {
this.style.overflowY = document.body.style.overflowY;
document.body.style.overflowY = 'hidden'; // prevent body scrolling
}
componentWillUnmount() {