diff --git a/packages/ui/__stories__/Tooltip.stories.tsx b/packages/ui/__stories__/Tooltip.stories.tsx index ea81e934e..10e185624 100644 --- a/packages/ui/__stories__/Tooltip.stories.tsx +++ b/packages/ui/__stories__/Tooltip.stories.tsx @@ -142,6 +142,18 @@ Invisible.args = { id: 'tooltip-story-invisible', } +export const Visible = Template.bind({}) +Visible.args = { + visible: true, + id: 'tooltip-story-visible', +} + +export const Disabled = Template.bind({}) +Disabled.args = { + disabled: true, + id: 'tooltip-story-disabled', +} + export const WithTooltip: Story = () => (
= ({ updateToken, tooltipContainer = 'body', hoverAbleTooltip = true, + disabled = false, }) => { const [isShown, setShown] = useState(false) const timeoutRef = useRef(null) @@ -167,7 +169,7 @@ export const Tooltip: FC = ({ ) // Makes sure "visible" prop can override local "isShown" state - const isTooltipVisible = visibilityOverride ?? isShown + const isTooltipVisible = !disabled && (visibilityOverride || isShown) // Update the tooltip's position (useful when resizing table columns) useLayoutEffect(() => {