MCPcopy Index your code
hub / github.com/simstudioai/sim / useTooltipContext

Function useTooltipContext

packages/emcn/src/components/tooltip/tooltip.tsx:310–316  ·  view source on GitHub ↗
(component: string)

Source from the content-addressed store, hash-verified

308const TooltipContext = React.createContext<TooltipContextValue | null>(null)
309
310function useTooltipContext(component: string): TooltipContextValue {
311 const context = React.useContext(TooltipContext)
312 if (!context) {
313 throw new Error(`Tooltip.${component} must be rendered within a Tooltip.Root`)
314 }
315 return context
316}
317
318interface RootProps {
319 children: React.ReactNode

Callers 2

tooltip.tsxFile · 0.85
ContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected