This repository was archived by the owner on Nov 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,14 @@ import { HoveredToken } from './token_position'
1212import { HoverMerged , LOADING } from './types'
1313import { toPrettyBlobURL } from './url'
1414
15+ /** The component used to render a link */
16+ export type LinkComponent = React . ComponentType < { to : string } & React . HTMLAttributes < HTMLElement > >
17+
1518/**
1619 * Uses a placeholder `<button>` or a React Router `<Link>` depending on whether `to` is set.
1720 */
1821const ButtonOrLink : React . StatelessComponent <
19- { linkComponent : React . ComponentType < { to : string } > ; to ?: string } & React . HTMLAttributes < HTMLElement >
22+ { linkComponent : LinkComponent ; to ?: string } & React . HTMLAttributes < HTMLElement >
2023> = ( { linkComponent, to, children, ...rest } ) => {
2124 const Link = linkComponent
2225 return to ? (
@@ -56,7 +59,8 @@ export interface HoverOverlayProps {
5659 /** Whether to show the close button for the hover overlay */
5760 showCloseButton : boolean
5861
59- linkComponent : React . ComponentType < { to : string } >
62+ /** The component used to render links */
63+ linkComponent : LinkComponent
6064
6165 /** Called when the Go-to-definition button was clicked */
6266 onGoToDefinitionClick ?: ( event : MouseEvent ) => void
You can’t perform that action at this time.
0 commit comments