UNPKG

@itwin/unified-selection-react

Version:

React components for making use of `@itwin/unified-selection` package in React applications more straightforward

27 lines 1.02 kB
import { PropsWithChildren } from "react"; import { SelectionStorage } from "@itwin/unified-selection"; /** @public */ interface UnifiedSelectionContext { /** Unified selection storage */ storage: SelectionStorage; } /** * A React context provider that makes given unified selection context available to all child components. This * is a requirement for `useUnifiedSelectionContext` to return valid context. * * See `README.md` for a usage example. * * @public */ export declare function UnifiedSelectionContextProvider(props: PropsWithChildren<UnifiedSelectionContext>): import("react/jsx-runtime").JSX.Element; /** * A React hook for accessing unified selection context. The context must be provided by `UnifiedSelectionContextProvider`, * otherwise the hook will return `undefined`. * * See `README.md` for a usage example. * * @public */ export declare function useUnifiedSelectionContext(): UnifiedSelectionContext | undefined; export {}; //# sourceMappingURL=UnifiedSelectionContext.d.ts.map