(component: string)
| 308 | const TooltipContext = React.createContext<TooltipContextValue | null>(null) |
| 309 | |
| 310 | function 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 | |
| 318 | interface RootProps { |
| 319 | children: React.ReactNode |
no outgoing calls
no test coverage detected