UNPKG

752 BJavaScriptView Raw
1"use strict";
2
3var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4Object.defineProperty(exports, "__esModule", {
5 value: true
6});
7exports.default = void 0;
8exports.useStepContext = useStepContext;
9var React = _interopRequireWildcard(require("react"));
10/**
11 * Provides information about the current step in Stepper.
12 */
13const StepContext = /*#__PURE__*/React.createContext({});
14if (process.env.NODE_ENV !== 'production') {
15 StepContext.displayName = 'StepContext';
16}
17
18/**
19 * Returns the current StepContext or an empty object if no StepContext
20 * has been defined in the component tree.
21 */
22function useStepContext() {
23 return React.useContext(StepContext);
24}
25var _default = exports.default = StepContext;
\No newline at end of file