@mui/x-date-pickers
Version:
The community edition of the Date and Time Picker components (MUI X).
18 lines (17 loc) • 847 B
JavaScript
'use client';
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.usePickerTextFieldOwnerState = exports.PickerTextFieldOwnerStateContext = void 0;
var React = _interopRequireWildcard(require("react"));
const PickerTextFieldOwnerStateContext = exports.PickerTextFieldOwnerStateContext = /*#__PURE__*/React.createContext(null);
const usePickerTextFieldOwnerState = () => {
const value = React.useContext(PickerTextFieldOwnerStateContext);
if (value == null) {
throw new Error(['MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component'].join('\n'));
}
return value;
};
exports.usePickerTextFieldOwnerState = usePickerTextFieldOwnerState;
;