UNPKG

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