@activecollab/components
Version:
ActiveCollab Components
19 lines • 637 B
JavaScript
import React, { createContext, useContext } from "react";
const ContentWizardContext = /*#__PURE__*/createContext(undefined);
export const ContentWizardContextProvider = _ref => {
let {
children,
value
} = _ref;
return /*#__PURE__*/React.createElement(ContentWizardContext.Provider, {
value: value
}, children);
};
export const useContentWizardContext = () => {
const context = useContext(ContentWizardContext);
if (context === undefined) {
throw new Error("useContentWizardContext must be used within a ContentWizardContextProvider");
}
return context;
};
//# sourceMappingURL=ContentWizardContext.js.map