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.

9 lines 377 B
import * as React from 'react'; export const SelectItemContext = /*#__PURE__*/React.createContext(undefined); export function useSelectItemContext() { const context = React.useContext(SelectItemContext); if (context === undefined) { throw new Error('Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.'); } return context; }