UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

11 lines (10 loc) 394 B
'use client'; import * as React from 'react'; export const TooltipRootContext = /*#__PURE__*/React.createContext(undefined); export function useTooltipRootContext() { const context = React.useContext(TooltipRootContext); if (context === undefined) { throw new Error('Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.'); } return context; }