UNPKG

@payfit/unity-components

Version:

18 lines (17 loc) 522 B
import { createContext as e, useContext as t } from "react"; import { jsx as n } from "react/jsx-runtime"; //#region src/components/stepper/Stepper.context.tsx var r = e({ currentStep: 0 }); function i({ children: e, currentStep: t }) { return /* @__PURE__ */ n(r.Provider, { value: { currentStep: t }, children: e }); } function a() { let e = t(r); if (!e) throw Error("useStepperContext must be used within an StepperProvider"); return e; } //#endregion export { i as StepperProvider, a as useStepperContext };