Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit c496d1e

Browse files
authored
feat: add className prop to HoverOverlay (#60)
1 parent e84c5d4 commit c496d1e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/HoverOverlay.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export interface HoverOverlayProps {
6262
/** The component used to render links */
6363
linkComponent: LinkComponent
6464

65+
/** An optional class name to apply to the outermost element of the HoverOverlay */
66+
className?: string
67+
6568
/** Called when the Go-to-definition button was clicked */
6669
onGoToDefinitionClick?: (event: MouseEvent) => void
6770

@@ -89,9 +92,10 @@ export const HoverOverlay: React.StatelessComponent<HoverOverlayProps> = ({
8992
overlayPosition,
9093
showCloseButton,
9194
logTelemetryEvent = noop,
95+
className = '',
9296
}) => (
9397
<div
94-
className="hover-overlay card"
98+
className={`hover-overlay card ${className}`}
9599
ref={hoverRef}
96100
// tslint:disable-next-line:jsx-ban-props needed for dynamic styling
97101
style={

0 commit comments

Comments
 (0)