src/components/OutsideClick.js
/**
   * Alert if clicked on outside of element
   */
Alert if clicked on outside of element
Alert if clicked on outside of element
handleClickOutside(event) {
    if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
     return  this.props.outsideClick()
    }
    this.props.insideClick()
  }
handleClickOutside ( event ) { if ( this . wrapperRef && ! this . wrapperRef . contains ( event . target ) ) { return this . props . outsideClick ( ) } this . props . insideClick ( ) }
Alert if clicked on outside of element
Alert if clicked on outside of element