UNPKG

@mui/x-date-pickers-pro

Version:

The Pro plan edition of the MUI X Date and Time Picker components.

16 lines (14 loc) 657 B
'use client'; import * as React from 'react'; export const PickerRangePositionContext = /*#__PURE__*/React.createContext(null); /** * Returns information about the range position of the picker that wraps the current component. */ if (process.env.NODE_ENV !== "production") PickerRangePositionContext.displayName = "PickerRangePositionContext"; export function usePickerRangePositionContext() { const value = React.useContext(PickerRangePositionContext); if (value == null) { throw new Error(['MUI X: The `usePickerRangePositionContext` can only be called in components that are used inside a picker component'].join('\n')); } return value; }