Files
documentation/node_modules/@docusaurus/theme-common/lib/hooks/useKeyboardNavigation.d.ts
2024-03-22 03:47:51 +05:30

20 lines
896 B
TypeScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import './styles.css';
export declare const keyboardFocusedClassName = "navigation-with-keyboard";
/**
* Side-effect that adds the `keyboardFocusedClassName` to the body element when
* the keyboard has been pressed, or removes it when the mouse is clicked.
*
* The presence of this class name signals that the user may be using keyboard
* for navigation, and the theme **must** add focus outline when this class name
* is present. (And optionally not if it's absent, for design purposes)
*
* Inspired by https://hackernoon.com/removing-that-ugly-focus-ring-and-keeping-it-too-6c8727fefcd2
*/
export declare function useKeyboardNavigation(): void;
//# sourceMappingURL=useKeyboardNavigation.d.ts.map