mirror of
https://github.com/actualbudget/actual.git
synced 2026-05-10 16:26:43 -05:00
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
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 type React from 'react';
|
|
/** This hook wires the logic for a skip-to-content link. */
|
|
export declare function useSkipToContent(): {
|
|
/**
|
|
* The ref to the container. On page transition, the container will be focused
|
|
* so that keyboard navigators can instantly interact with the link and jump
|
|
* to content. **Note:** the type is `RefObject<HTMLDivElement>` only because
|
|
* the typing for refs don't reflect that the `ref` prop is contravariant, so
|
|
* using `HTMLElement` causes type-checking to fail. You can plug the ref into
|
|
* any HTML element, as long as it can be focused.
|
|
*/
|
|
containerRef: React.RefObject<HTMLDivElement>;
|
|
/**
|
|
* Callback fired when the skip to content link has been interacted with. It
|
|
* will programmatically focus the main content.
|
|
*/
|
|
handleSkip: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
};
|
|
//# sourceMappingURL=useSkipToContent.d.ts.map
|