Files
starface-outlook-sync-addin/node_modules/@fluentui/react-hooks/lib-commonjs/useTarget.d.ts
T
Stefan Hacker 37ad745546 first commit
2026-04-03 09:38:48 +02:00

13 lines
886 B
TypeScript

import { Rectangle } from '@fluentui/utilities';
import * as React from 'react';
import type { Point } from '@fluentui/utilities';
export type Target = Element | string | MouseEvent | Point | Rectangle | null | React.RefObject<Element | null>;
/**
* Hook to calculate and cache the target element specified by the given target attribute,
* as well as the target element's (or host element's) parent window
* @param target- Target selector passed to the component as a property, describing the element that
* the callout should target
* @param hostElement- The callout's host element, used for determining the parent window.
*/
export declare function useTarget<TElement extends HTMLElement = HTMLElement>(target: Target | undefined, hostElement?: React.RefObject<TElement | null>): Readonly<[React.RefObject<Element | MouseEvent | Point | Rectangle | null>, Window | undefined]>;