UNPKG

@fremtind/jkl-feedback-react

Version:
23 lines (22 loc) 697 B
import React, { createContext, useContext } from "react"; const initialState = { feedbackSubmitted: false, followupStarted: false, followupSubmitted: false, contactSubmitted: false, setFeedbackSubmitted: () => null, setFollowupStarted: () => null, setFollowupSubmitted: () => null, setContactSubmitted: () => null }; const feedbackContext = createContext(initialState); const useFeedbackContext = () => useContext(feedbackContext); const FeedbackContextProvider = ({ value, children }) => /* @__PURE__ */ React.createElement(feedbackContext.Provider, { value }, children); export { FeedbackContextProvider, useFeedbackContext }; //# sourceMappingURL=feedbackContext.js.map