Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
);
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,
);
};