@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
29 lines • 1.39 kB
TypeScript
import React from 'react';
/**
* This hook will bring an element to the top of the stack when any element inside the provided
* {@link PopupModel}'s `state.stackRef` element is clicked. If {@link PopupPopper Popup.Popper} was
* used or `PopupStack.add` provided an `owner`, all "child" popups will also be brought to the top.
* A "child" popup is a Popup that was opened from another Popup. Usually this is a Tooltip or
* Select component inside something like a Modal.
*
* This should be used on popup elements that are meant to persist (i.e. Windows).
*/
export declare const useBringToTopOnClick: import("@workday/canvas-kit-react/common").BehaviorHook<{
state: {
stackRef: React.RefObject<HTMLDivElement>;
targetRef: React.RefObject<HTMLButtonElement>;
initialFocusRef: React.RefObject<any> | undefined;
returnFocusRef: React.RefObject<any> | undefined;
placement: import("@popperjs/core").Placement;
id: string;
visibility: "hidden" | "visible";
};
events: {
updatePlacement(data: {
placement: import("@popperjs/core").Placement;
}): void;
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
};
}, {}>;
//# sourceMappingURL=useBringToTopOnClick.d.ts.map