Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_update = () => {
const {className, container, show} = this.props;
if (!(show && isBody(container))) {
return;
}
// Set a classname on the body for scoping purposes.
container.classList.add(BODY_CLASS);
!!className && container.classList.add(...className.split(' '));
}
}
Overlay.propTypes = {
children: PropTypes.element,
container: componentOrElement.isRequired,
onMenuHide: PropTypes.func,
onMenuShow: PropTypes.func,
onMenuToggle: PropTypes.func,
referenceElement: componentOrElement,
show: PropTypes.bool,
};
Overlay.defaultProps = {
onMenuHide: noop,
onMenuShow: noop,
onMenuToggle: noop,
show: false,
};
export default Overlay;