@itwin/core-react
Version:
A react component library of iTwin.js UI general purpose components
25 lines • 829 B
TypeScript
/** @packageDocumentation
* @module Utilities
*/
import * as React from "react";
/** Properties for [[WidgetOpacityContext]]
* @internal
*/
export interface WidgetOpacityContextProps {
readonly proximityScale: number;
readonly addRef: (ref: React.RefObject<Element | null>) => void;
readonly removeRef: (ref: React.RefObject<Element | null>) => void;
}
/**
* Context used by Widgets and child components to process opacity changes based on mouse proximity.
* @internal
*/
export declare const WidgetOpacityContext: React.Context<WidgetOpacityContextProps>;
/** Hook for using [[WidgetOpacityContext]]
* @internal
*/
export declare function useWidgetOpacityContext<T extends Element>(): {
ref: React.RefObject<T | null>;
proximityScale: number;
};
//# sourceMappingURL=useWidgetOpacityContext.d.ts.map