UNPKG

499 BJavaScriptView Raw
1import * as React from 'react';
2/**
3 * Provides information about the current step in Stepper.
4 */
5const StepperContext = /*#__PURE__*/React.createContext({});
6if (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 */
14export function useStepperContext() {
15 return React.useContext(StepperContext);
16}
17export default StepperContext;
\No newline at end of file