@zendeskgarden/container-focusvisible
Version:
Containers relating to the :focus-visible polyfill hook in the Garden Design System
18 lines (17 loc) • 748 B
TypeScript
/**
* Copyright Zendesk, Inc.
*
* Use of this source code is governed under the Apache License, Version 2.0
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/
export interface IUseFocusVisibleProps<RefType = HTMLElement> {
/** A ref pointing to the scope which contains focus visible elements */
scope: React.RefObject<RefType>;
/** A relative document */
relativeDocument?: any;
/** A class name applied to the element with `:focus-visible` behavior */
className?: string;
/** A data attribute applied to the element with `:focus-visible` behavior */
dataAttribute?: string;
}
export declare function useFocusVisible({ scope, relativeDocument, className, dataAttribute }?: IUseFocusVisibleProps): void;