@activecollab/components
Version:
ActiveCollab Components
13 lines (11 loc) • 452 B
JavaScript
import { createContext, useContext } from "react";
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export const DialogContext = /*#__PURE__*/createContext(null);
export const useDialogContext = () => {
const context = 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