1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = Object.setPrototypeOf ||
|
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6 | return function (d, b) {
|
7 | extendStatics(d, b);
|
8 | function __() { this.constructor = d; }
|
9 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
10 | };
|
11 | })();
|
12 | var __assign = (this && this.__assign) || Object.assign || function(t) {
|
13 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
14 | s = arguments[i];
|
15 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
16 | t[p] = s[p];
|
17 | }
|
18 | return t;
|
19 | };
|
20 | Object.defineProperty(exports, "__esModule", { value: true });
|
21 | var classnames = require("classnames");
|
22 | var React = require("react");
|
23 | var HKTooltip = (function (_super) {
|
24 | __extends(HKTooltip, _super);
|
25 | function HKTooltip() {
|
26 | return _super !== null && _super.apply(this, arguments) || this;
|
27 | }
|
28 | HKTooltip.prototype.render = function () {
|
29 | var _a = this.props, children = _a.children, height = _a.height, width = _a.width, xPos = _a.xPos, yPos = _a.yPos, style = _a.style;
|
30 | var styleProps = __assign({ backgroundColor: 'rgba(254,255,228,.75)', height: height && height, transform: "translate(" + (xPos + 5) + "px," + yPos + "px)", width: width && width }, style);
|
31 | return (React.createElement("div", { className: classnames('absolute z-1 f7 b', { mw4: !width }), style: styleProps },
|
32 | React.createElement("p", null, children)));
|
33 | };
|
34 | return HKTooltip;
|
35 | }(React.PureComponent));
|
36 | exports.default = HKTooltip;
|
37 |
|
\ | No newline at end of file |