UNPKG

@payfit/unity-components

Version:

18 lines (17 loc) 529 B
import { createContext as e, useContext as t } from "react"; import { jsx as n } from "react/jsx-runtime"; //#region src/components/timeline/parts/TimelineStep.context.tsx var r = e(null); function i({ labelId: e, children: t }) { return /* @__PURE__ */ n(r.Provider, { value: { labelId: e }, children: t }); } function a() { let e = t(r); if (!e) throw Error("useTimelineStepContext must be used within TimelineStepProvider"); return e; } //#endregion export { i as TimelineStepProvider, a as useTimelineStepContext };