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