MCPcopy Index your code
hub / github.com/primer/react / closeTooltip

Function closeTooltip

packages/react/src/TooltipV2/Tooltip.tsx:226–236  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

224 }
225 }
226 const closeTooltip = () => {
227 if (
228 tooltipElRef.current &&
229 triggerRef.current &&
230 tooltipElRef.current.hasAttribute('popover') &&
231 tooltipElRef.current.matches(':popover-open')
232 ) {
233 tooltipElRef.current.hidePopover()
234 setIsPopoverOpen(false)
235 }
236 }
237
238 // context value
239 const value = useMemo(() => ({tooltipId}), [tooltipId])

Callers 1

Tooltip.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected