UNPKG

@mui/x-date-pickers-pro

Version:

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

17 lines (15 loc) 784 B
'use client'; import _formatErrorMessage from "@mui/x-internals/formatErrorMessage"; 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(process.env.NODE_ENV !== "production" ? `MUI X: The \`usePickerRangePositionContext\` can only be called in components that are used inside a picker component` : _formatErrorMessage(161)); } return value; }