@itwin/presentation-hierarchies-react
Version:
React components based on `@itwin/presentation-hierarchies`
22 lines • 1.17 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import { createContext, useContext } from "react";
const deprecatedUnifiedSelectionContext = createContext(undefined);
/**
* A React context provider that makes given selection storage available to all child components. This
* is a requirement for `useUnifiedSelectionTree` to work with unified selection.
*
* @public
* @deprecated in 1.5.0. Use `UnifiedSelectionContextProvider` from `@itwin/unified-selection-react` instead.
*/
export function UnifiedSelectionProvider({ storage, children }) {
return _jsx(deprecatedUnifiedSelectionContext.Provider, { value: storage, children: children });
}
/** @internal */
export function useUnifiedSelectionStorage() {
return useContext(deprecatedUnifiedSelectionContext);
}
//# sourceMappingURL=UnifiedSelectionContext.js.map