Skip to content

Commit 9b8501d

Browse files
authored
chore(netdata table): add support for custom tooltip component (#437)
* chore(netdata table): add support for custom tooltip component * v2.9.1 * review(netdata table): initialize custom action tooltip * v2.9.2
1 parent 0b19493 commit 9b8501d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netdata/netdata-ui",
3-
"version": "2.9.0",
3+
"version": "2.9.2",
44
"description": "netdata UI kit",
55
"main": "./lib/index.js",
66
"files": [

src/components/tableV2/components/action.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const Action = forwardRef(
3232
flavour = "borderless",
3333
CustomUIAction,
3434
label,
35+
TooltipComponent = Tooltip,
3536
...rest
3637
},
3738
ref
@@ -87,12 +88,12 @@ const Action = forwardRef(
8788
handleConfirm={onActionConfirmed}
8889
/>
8990
)}
90-
<Tooltip content={disabled ? disabledTooltipText : tooltipText}>
91+
<TooltipComponent content={disabled ? disabledTooltipText : tooltipText}>
9192
<Flex
9293
ref={ref}
9394
alignItems="center"
9495
justifyContent="center"
95-
_hover={{ background: (disabled || label) ? null : "borderSecondary" }}
96+
_hover={{ background: disabled || label ? null : "borderSecondary" }}
9697
cursor={disabled ? "auto" : "pointer"}
9798
key={id}
9899
round
@@ -111,7 +112,7 @@ const Action = forwardRef(
111112
{...rest}
112113
/>
113114
</Flex>
114-
</Tooltip>
115+
</TooltipComponent>
115116
</>
116117
)
117118
}

0 commit comments

Comments
 (0)