react-hook-popup
Version:
Easily manage popups like alerts and modals in React with a single hook
20 lines (19 loc) • 647 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PopupContext = void 0;
var react_1 = require("react");
var consts_1 = require("./utils/consts");
exports.PopupContext = react_1.createContext({
registerPopup: function () {
throw new Error(consts_1.consts.CONTEXT_ERROR_MESSAGE);
},
unRegisterPopup: function () {
throw new Error(consts_1.consts.CONTEXT_ERROR_MESSAGE);
},
displayPopup: function () {
throw new Error(consts_1.consts.CONTEXT_ERROR_MESSAGE);
},
closePopup: function () {
throw new Error(consts_1.consts.CONTEXT_ERROR_MESSAGE);
},
});