diff --git a/src/components/overlays/Tooltip/TooltipProvider.stories.tsx b/src/components/overlays/Tooltip/TooltipProvider.stories.tsx index 4814de6..d1012d0 100644 --- a/src/components/overlays/Tooltip/TooltipProvider.stories.tsx +++ b/src/components/overlays/Tooltip/TooltipProvider.stories.tsx @@ -155,3 +155,15 @@ export const TooltipDraggable: Story = { name: 'Tooltip (draggable anchor)', render: () => , }; + +export const TooltipEmpty: Story = { + args: { + tooltip: '', + }, +}; + +export const TooltipNull: Story = { + args: { + tooltip: null, + }, +}; diff --git a/src/components/overlays/Tooltip/TooltipProvider.tsx b/src/components/overlays/Tooltip/TooltipProvider.tsx index 62da456..c711168 100644 --- a/src/components/overlays/Tooltip/TooltipProvider.tsx +++ b/src/components/overlays/Tooltip/TooltipProvider.tsx @@ -85,7 +85,7 @@ export const TooltipProvider = (props: TooltipProviderProps) => { }, [isMounted, onTooltipActivated, onTooltipDeactivated]); const renderTooltip = () => { - if (!isMounted) { return null; } + if (!isMounted || !tooltip) { return null; } const floatingProps = getFloatingProps({ popover: 'manual',