@itwin/core-react
Version:
A react component library of iTwin.js UI general purpose components
29 lines • 1.25 kB
TypeScript
/** @packageDocumentation
* @module Popup
*/
import * as React from "react";
/** Focus into first focusable element of a container.
* @internal
*/
export declare function focusIntoContainer(focusContainer: HTMLDivElement, initialFocusElement?: React.RefObject<HTMLElement | null> | string): boolean;
/** Properties supported by [[FocusTrap]] component.
* @internal
*/
export interface FocusTrapProps extends React.AllHTMLAttributes<any> {
/** child components */
children: React.ReactNode;
/** if active is not true then no trapping of focus is attempted. */
active?: boolean;
/** restore focus to element that had focus before trap was activated */
returnFocusOnDeactivate: boolean;
/** Optional reference to element to receive focus when trap is activated. Optionally a CSS Selector
* string can be supplied to locate an element in the FocusTrap container. If no specification is defined
* the first focusable element is used.
*/
initialFocusElement?: React.RefObject<HTMLElement | null> | string;
}
/** Trap Focus in container while trap is active.
* @internal
*/
export declare function FocusTrap(props: FocusTrapProps): React.JSX.Element | null;
//# sourceMappingURL=FocusTrap.d.ts.map