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