fix: Refactor hover previews to reduce false positives (#6091)

This commit is contained in:
Tom Moor
2023-10-29 18:31:12 -04:00
committed by GitHub
parent 90bc60d4cf
commit 6b13a32234
9 changed files with 265 additions and 212 deletions

View File

@@ -124,7 +124,7 @@ export type Props = {
event: MouseEvent | React.MouseEvent<HTMLButtonElement>
) => void;
/** Callback when user hovers on any link in the document */
onHoverLink?: (element: HTMLAnchorElement) => boolean;
onHoverLink?: (element: HTMLAnchorElement | null) => boolean;
/** Callback when user presses any key with document focused */
onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
/** Collection of embed types to render in the document */