UNPKG

organism-react-onboarding

Version:
63 lines (53 loc) 2.12 kB
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2"; import _extends from "reshow-runtime/es/helpers/extends"; import _objectWithoutProperties from "reshow-runtime/es/helpers/objectWithoutProperties"; import _classCallCheck from "reshow-runtime/es/helpers/classCallCheck"; import _createClass from "reshow-runtime/es/helpers/createClass"; import _inherits from "reshow-runtime/es/helpers/inherits"; import _createSuper from "reshow-runtime/es/helpers/createSuper"; var _excluded = ["wh", "maskScroll", "targetEl", "isSetFixed", "modalStyle", "children", "name"]; import React, { PureComponent } from "react"; import { PopupModal, PopupFloatEl } from "organism-react-popup"; var Tooltip = /*#__PURE__*/function (_PureComponent) { _inherits(Tooltip, _PureComponent); var _super = _createSuper(Tooltip); function Tooltip() { _classCallCheck(this, Tooltip); return _super.apply(this, arguments); } _createClass(Tooltip, [{ key: "render", value: function render() { var _this$props = this.props, wh = _this$props.wh, maskScroll = _this$props.maskScroll, targetEl = _this$props.targetEl, isSetFixed = _this$props.isSetFixed, modalStyle = _this$props.modalStyle, children = _this$props.children, name = _this$props.name, props = _objectWithoutProperties(_this$props, _excluded); var floatClassName; if (isSetFixed) { floatClassName = "react-onboarding-fixed"; } return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(PopupModal, _extends({}, props, { name: name, modal: null, maskScroll: maskScroll })), /*#__PURE__*/React.createElement(PopupFloatEl, { name: name, style: _objectSpread(_objectSpread({}, modalStyle), {}, { zIndex: 99999 }), targetEl: targetEl, className: floatClassName, alignParams: { positionFixed: true } }, children)); } }]); return Tooltip; }(PureComponent); export default Tooltip;