How to use the react-popper.Manager function in react-popper

To help you get started, we’ve selected a few react-popper 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 deranjer / goTorrent / goTorrentWebUI / node_modules / material-ui / Tooltip / Tooltip.js View on Github external
childrenProps.onMouseOver = this.handleRequestOpen;
        childrenProps.onMouseLeave = this.handleClose;
      }

      if (!disableTriggerFocus) {
        childrenProps.onFocus = this.handleRequestOpen;
        childrenProps.onBlur = this.handleClose;
      }

      process.env.NODE_ENV !== "production" ? (0, _warning2.default)(!childrenProp.props.title, ['Material-UI: you have been providing a `title` property to the child of .', 'Remove this title property `' + childrenProp.props.title + '` or the Tooltip component.'].join('\n')) : void 0;

      return _react2.default.createElement(
        _reactEventListener2.default,
        { target: 'window', onResize: this.handleResize },
        _react2.default.createElement(
          _reactPopper.Manager,
          (0, _extends3.default)({ className: (0, _classnames2.default)(classes.root, className) }, other),
          _react2.default.createElement(
            _reactPopper.Target,
            null,
            function (_ref2) {
              var targetProps = _ref2.targetProps;
              return _react2.default.createElement(
                _RefHolder2.default,
                {
                  ref: function ref(node) {
                    _this2.children = (0, _reactDom.findDOMNode)(node);
                    targetProps.ref(_this2.children);
                  }
                },
                _react2.default.cloneElement(childrenProp, childrenProps)
              );
github sablierhq / sablier / packages / frontend / src / pages / PayWithSablier / MyReactDatePicker / index.jsx View on Github external
className: classes,
                "data-placement": placement,
              },
            ),
            React.cloneElement(popperComponent, { arrowProps: arrowProps }),
          );
        },
      );
    }

    if (this.props.popperContainer) {
      popper = React.createElement(this.props.popperContainer, {}, popper);
    }

    return React.createElement(
      reactPopper.Manager,
      null,
      React.createElement(reactPopper.Reference, null, function(_ref2) {
        var ref = _ref2.ref;
        return React.createElement("div", { ref: ref, className: "react-datepicker-wrapper" }, targetComponent);
      }),
      popper,
    );
  };

react-popper

Official library to use Popper on React projects

MIT
Latest version published 3 years ago

Package Health Score

79 / 100
Full package analysis