UNPKG

490 BJavaScriptView Raw
1'use client';
2
3import * as React from 'react';
4/**
5 * Provides information about the current step in Stepper.
6 */
7const StepContext = /*#__PURE__*/React.createContext({});
8if (process.env.NODE_ENV !== 'production') {
9 StepContext.displayName = 'StepContext';
10}
11
12/**
13 * Returns the current StepContext or an empty object if no StepContext
14 * has been defined in the component tree.
15 */
16export function useStepContext() {
17 return React.useContext(StepContext);
18}
19export default StepContext;
\No newline at end of file