How to use the react-overlays/lib/Modal.defaultProps function in react-overlays

To help you get started, we’ve selected a few react-overlays examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-bootstrap / react-bootstrap / src / Modal.js View on Github external
*/
  onExiting: PropTypes.func,

  /**
   * Callback fired after the Modal finishes transitioning out
   */
  onExited: PropTypes.func,

  /**
   * @private
   */
  container: BaseModal.propTypes.container
};

const defaultProps = {
  ...BaseModal.defaultProps,
  animation: true,
  dialogComponentClass: ModalDialog
};

const childContextTypes = {
  $bs_modal: PropTypes.shape({
    onHide: PropTypes.func
  })
};

/* eslint-disable no-use-before-define, react/no-multi-comp */
function DialogTransition(props) {
  return ;
}

function BackdropTransition(props) {
github zhbhun / WebpackStudyDemo / 7-advanced / 7.3-buil-performance / src / Modal.js View on Github external
getDefaultProps() {
    return {
      ...BaseModal.defaultProps,
      bsClass: 'modal',
      animation: true,
      dialogComponentClass: ModalDialog,
    };
  },
github forestturner / PokerHandRangeCalc / node_modules / react-bootstrap / es / Modal.js View on Github external
* Callback fired as the Modal begins to transition out
   */
  onExiting: React.PropTypes.func,

  /**
   * Callback fired after the Modal finishes transitioning out
   */
  onExited: React.PropTypes.func,

  /**
   * @private
   */
  container: BaseModal.propTypes.container
});

var defaultProps = _extends({}, BaseModal.defaultProps, {
  animation: true,
  dialogComponentClass: ModalDialog
});

var childContextTypes = {
  $bs_modal: React.PropTypes.shape({
    onHide: React.PropTypes.func
  })
};

var Modal = function (_React$Component) {
  _inherits(Modal, _React$Component);

  function Modal(props, context) {
    _classCallCheck(this, Modal);
github jquense / react-bootstrap-modal / src / Modal.js View on Github external
modalPrefix: PropTypes.string,
    dialogClassName: PropTypes.string,
    attentionClass: PropTypes.string,
  }

  static defaultProps = {
    backdrop:           true,
    keyboard:           true,
    animate:            true,
    transition:         true,
    container:          canUseDOM ? document.body : null,
    attentionClass:     'shake',
    manager: (BaseModal.getDefaultProps
      ? BaseModal.getDefaultProps()
      : BaseModal.defaultProps
    ).manager
  }

  static childContextTypes = {
    onModalHide: PropTypes.func
  }

  getChildContext(){
    return this._context || (this._context = { onModalHide: this.props.onHide })
  }

  constructor(){
    super()

    this.handleEntering = this.handleEntering.bind(this)
    this.handleExiting  = this.handleExiting.bind(this)