@@ -33,6 +33,7 @@ export interface ChartPopoverProps extends PopoverProps {
3333 </>)
3434 */
3535 trackKey ?: string | number ;
36+ minHeight ?: number ;
3637
3738 /** Optional container element that prevents any clicks in there from dismissing the popover */
3839 container : Element | null ;
@@ -53,6 +54,9 @@ export interface ChartPopoverProps extends PopoverProps {
5354
5455 /** Popover footer */
5556 footer ?: React . ReactNode ;
57+
58+ hoverDismissButton ?: boolean ;
59+ allowScrollToFit ?: boolean ;
5660}
5761
5862export default React . forwardRef ( ChartPopover ) ;
@@ -63,6 +67,8 @@ function ChartPopover(
6367 size = 'medium' ,
6468 fixedWidth = false ,
6569 dismissButton = false ,
70+ hoverDismissButton = false ,
71+ allowScrollToFit = false ,
6672 dismissAriaLabel,
6773
6874 children,
@@ -74,6 +80,7 @@ function ChartPopover(
7480 trackKey,
7581 onDismiss,
7682 container,
83+ minHeight,
7784
7885 onMouseEnter,
7986 onMouseLeave,
@@ -127,6 +134,7 @@ function ChartPopover(
127134 trackRef = { trackRef }
128135 getTrack = { getTrack }
129136 trackKey = { trackKey }
137+ minHeight = { minHeight }
130138 arrow = { position => (
131139 < div className = { clsx ( popoverStyles . arrow , popoverStyles [ `arrow-position-${ position } ` ] ) } >
132140 < div className = { popoverStyles [ 'arrow-outer' ] } />
@@ -135,11 +143,12 @@ function ChartPopover(
135143 ) }
136144 keepPosition = { true }
137145 allowVerticalOverflow = { true }
138- allowScrollToFit = { isPinned }
146+ allowScrollToFit = { isPinned || allowScrollToFit }
139147 hoverArea = { true }
140148 >
141149 < PopoverBody
142- dismissButton = { dismissButton }
150+ dismissButton = { dismissButton || hoverDismissButton }
151+ autoFocusDismissButton = { ! ( hoverDismissButton === true ) }
143152 dismissAriaLabel = { dismissAriaLabel }
144153 header = { < span className = { testClasses . header } > { title } </ span > }
145154 onDismiss = { onDismiss }
0 commit comments