@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.
12 lines • 503 B
JavaScript
import * as React from 'react';
export const MenuRadioItemContext = /*#__PURE__*/React.createContext(undefined);
if (process.env.NODE_ENV !== 'production') {
MenuRadioItemContext.displayName = 'MenuRadioItemContext';
}
export function useMenuRadioItemContext() {
const context = React.useContext(MenuRadioItemContext);
if (context === undefined) {
throw new Error('Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.');
}
return context;
}