UNPKG

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