@@ -6,12 +6,6 @@ import { createPopper } from "@popperjs/core";
66import { CLASSPREFIX as eccgui } from "../../configuration/constants" ;
77import { ContextOverlayProps , TestableComponent , TooltipSize } from "../../index" ;
88
9- /**
10- * Overlay without the necessity to use a target that need to be rendered in place.
11- * The target is referenced by a selector string or element object.
12- * It can exist somewhere in the DOM, but it must exist when the overlay is rendered.
13- * It is always displayed, close it by removement.
14- */
159export interface DecoupledOverlayProps
1610 extends React . HTMLAttributes < HTMLDivElement > ,
1711 TestableComponent ,
@@ -26,7 +20,12 @@ export interface DecoupledOverlayProps
2620 size ?: TooltipSize ;
2721}
2822
29- /** Popover that is displayed and points at the highlighted element. */
23+ /**
24+ * Use an overlay popover without the necessity to use a target that need to be rendered in place.
25+ * The target is referenced by a selector string or element object.
26+ * It can exist somewhere in the DOM, but it must exist when the overlay is rendered.
27+ * It is always displayed, close it by removement.
28+ */
3029export const DecoupledOverlay = ( {
3130 targetSelectorOrElement,
3231 usePortal = true ,
@@ -62,8 +61,8 @@ export const DecoupledOverlay = ({
6261 const overlay = (
6362 < div
6463 className = {
65- `${ eccgui } -visual-tour__overlay ` +
66- ` ${ eccgui } -visual-tour__overlay --${ size } ` +
64+ `${ eccgui } -decoupled-overlay ` +
65+ ` ${ eccgui } -decoupled-overlay --${ size } ` +
6766 ` ${ BlueprintClasses . POPOVER } ` +
6867 ( minimal ? ` ${ BlueprintClasses . MINIMAL } ` : "" )
6968 }
@@ -72,14 +71,12 @@ export const DecoupledOverlay = ({
7271 >
7372 { ! minimal && (
7473 < div
75- className = { `${ eccgui } -visual-tour__arrow ${ BlueprintClasses . POPOVER_ARROW } ` }
74+ className = { `${ eccgui } -decoupled-overlay__arrow ${ BlueprintClasses . POPOVER_ARROW } ` }
7675 data-popper-arrow
7776 aria-hidden
7877 />
7978 ) }
80- < div className = { `${ BlueprintClasses . POPOVER_CONTENT } ${ eccgui } -visual-tour__overlay__content` } >
81- { children }
82- </ div >
79+ < div className = { `${ BlueprintClasses . POPOVER_CONTENT } ${ eccgui } -decoupled-overlay__content` } > { children } </ div >
8380 </ div >
8481 ) ;
8582
0 commit comments