1 | import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
2 | import * as React from 'react';
|
3 | var EmptyList = [];
|
4 | export var PathRegisterContext = React.createContext(null);
|
5 | export function useMeasure() {
|
6 | return React.useContext(PathRegisterContext);
|
7 | }
|
8 |
|
9 | export var PathTrackerContext = React.createContext(EmptyList);
|
10 | export function useFullPath(eventKey) {
|
11 | var parentKeyPath = React.useContext(PathTrackerContext);
|
12 | return React.useMemo(function () {
|
13 | return eventKey !== undefined ? [].concat(_toConsumableArray(parentKeyPath), [eventKey]) : parentKeyPath;
|
14 | }, [parentKeyPath, eventKey]);
|
15 | }
|
16 | export var PathUserContext = React.createContext(null); |
\ | No newline at end of file |