UNPKG

@activecollab/components

Version:

ActiveCollab Components

18 lines (16 loc) 647 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useDialogContext = exports.DialogContext = void 0; var _react = require("react"); // eslint-disable-next-line @typescript-eslint/no-empty-interface var DialogContext = exports.DialogContext = /*#__PURE__*/(0, _react.createContext)(null); var useDialogContext = exports.useDialogContext = function useDialogContext() { var context = (0, _react.useContext)(DialogContext); if (!context) { throw new Error("Child components of Dialog can not be rendered outside the Dialog component!"); } return context; }; //# sourceMappingURL=DialogContext.js.map