@bento-core/table 1.0.1-ins.20 → 1.0.1-ins.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,8 +13,6 @@ require("./CustomHeaderCell.css");
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
// Import the CSS file
|
|
17
|
-
|
|
18
16
|
/**
|
|
19
17
|
*
|
|
20
18
|
* @returns default/Link/Custom view
|
|
@@ -30,7 +28,7 @@ const CustomHeaderCell = _ref => {
|
|
|
30
28
|
const {
|
|
31
29
|
dataField,
|
|
32
30
|
tooltipText,
|
|
33
|
-
|
|
31
|
+
tooltipDefinition,
|
|
34
32
|
header,
|
|
35
33
|
headerType,
|
|
36
34
|
customColHeaderRender
|
|
@@ -71,7 +69,7 @@ const CustomHeaderCell = _ref => {
|
|
|
71
69
|
alt: "tooltipIcon"
|
|
72
70
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
73
71
|
className: "tooltip-text"
|
|
74
|
-
},
|
|
72
|
+
}, tooltipDefinition)));
|
|
75
73
|
};
|
|
76
74
|
var _default = CustomHeaderCell;
|
|
77
75
|
exports.default = _default;
|
|
@@ -14,10 +14,8 @@
|
|
|
14
14
|
position: absolute;
|
|
15
15
|
z-index: 1;
|
|
16
16
|
bottom: 125%;
|
|
17
|
-
/* Position the tooltip above the icon */
|
|
18
17
|
left: 50%;
|
|
19
18
|
margin-left: -40px;
|
|
20
|
-
/* Use half of the width to center it */
|
|
21
19
|
opacity: 0;
|
|
22
20
|
transition: opacity 0.3s;
|
|
23
21
|
}
|
|
@@ -26,7 +24,6 @@
|
|
|
26
24
|
content: '';
|
|
27
25
|
position: absolute;
|
|
28
26
|
top: 100%;
|
|
29
|
-
/* At the bottom of the tooltip */
|
|
30
27
|
left: 50%;
|
|
31
28
|
margin-left: -5px;
|
|
32
29
|
border-width: 5px;
|
package/package.json
CHANGED
package/src/header/CustomCell.js
CHANGED
|
@@ -3,7 +3,7 @@ import TableCell from '@material-ui/core/TableCell';
|
|
|
3
3
|
import TableSortLabel from '@material-ui/core/TableSortLabel';
|
|
4
4
|
import MuiTooltip from '@material-ui/core/Tooltip';
|
|
5
5
|
import { headerTypes } from '../util/Types';
|
|
6
|
-
import './CustomHeaderCell.css';
|
|
6
|
+
import './CustomHeaderCell.css';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
@@ -19,7 +19,7 @@ const CustomHeaderCell = ({
|
|
|
19
19
|
const {
|
|
20
20
|
dataField,
|
|
21
21
|
tooltipText,
|
|
22
|
-
|
|
22
|
+
tooltipDefinition,
|
|
23
23
|
header,
|
|
24
24
|
headerType,
|
|
25
25
|
customColHeaderRender,
|
|
@@ -63,8 +63,9 @@ const CustomHeaderCell = ({
|
|
|
63
63
|
</Tooltip>
|
|
64
64
|
<div className="tooltip-icon">
|
|
65
65
|
<img src="https://raw.githubusercontent.com/google/material-design-icons/master/src/action/help/materialicons/24px.svg" alt="tooltipIcon" />
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
<div className="tooltip-text">
|
|
67
|
+
{tooltipDefinition}
|
|
68
|
+
</div>
|
|
68
69
|
</div>
|
|
69
70
|
</TableCell>
|
|
70
71
|
);
|
|
@@ -14,10 +14,8 @@
|
|
|
14
14
|
position: absolute;
|
|
15
15
|
z-index: 1;
|
|
16
16
|
bottom: 125%;
|
|
17
|
-
/* Position the tooltip above the icon */
|
|
18
17
|
left: 50%;
|
|
19
18
|
margin-left: -40px;
|
|
20
|
-
/* Use half of the width to center it */
|
|
21
19
|
opacity: 0;
|
|
22
20
|
transition: opacity 0.3s;
|
|
23
21
|
}
|
|
@@ -26,7 +24,6 @@
|
|
|
26
24
|
content: '';
|
|
27
25
|
position: absolute;
|
|
28
26
|
top: 100%;
|
|
29
|
-
/* At the bottom of the tooltip */
|
|
30
27
|
left: 50%;
|
|
31
28
|
margin-left: -5px;
|
|
32
29
|
border-width: 5px;
|