Implement tooltip on remaining paces

This commit is contained in:
Gustavo Lelis authored and James A. Petts committed 2020-05-15 13:56:35 +02:00
1 parent 57f4f4691c
commit 11e58e70f6
6 files changed
+100 -119

No files matched your search

@@ -43,6 +43,16 @@ const SegmentationTable = ({ title, amount, data }) => {
const itemKey = i;
const currentItem = i + 1;
const isActive = !!activeItem && activeItem[title] === i;
const handleOnClick = () => {
setActiveItem((s) => {
return {
...s,
[title]: s && s[title] === itemKey ? null : itemKey,
};
});
};
return (
<div
key={i}
@@ -52,14 +62,10 @@ const SegmentationTable = ({ title, amount, data }) => {
'border-primary-light': isActive,
}
)}
onClick={() => {
setActiveItem((s) => {
return {
...s,
[title]: s && s[title] === itemKey ? null : itemKey,
};
});
}}
onClick={handleOnClick}
onKeyDown={handleOnClick}
role="button"
tabIndex="0"
>
<div
className={classnames(