File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,9 @@ export default {
121121 options : [ true , false ] ,
122122 control : { type : 'inline-radio' } ,
123123 } ,
124+ wrapperProps : {
125+ control : { type : 'object' } ,
126+ } ,
124127 } ,
125128} as ComponentMeta < typeof Tooltip > ;
126129
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ export const Tooltip: FC<TooltipProps> = React.memo(
9595 width,
9696 wrapperClassNames,
9797 wrapperStyle,
98+ wrapperProps = { } ,
9899 ...rest
99100 } ,
100101 ref : React . ForwardedRef < TooltipRef >
@@ -615,6 +616,7 @@ export const Tooltip: FC<TooltipProps> = React.memo(
615616 className = { referenceWrapperClassNames }
616617 style = { wrapperStyle }
617618 id = { tooltipWrapperId ?. current }
619+ { ...wrapperProps }
618620 onClick = { (
619621 event : React . MouseEvent < HTMLDivElement , MouseEvent >
620622 ) : void => {
@@ -670,6 +672,7 @@ export const Tooltip: FC<TooltipProps> = React.memo(
670672 id = { tooltipWrapperId ?. current }
671673 style = { wrapperStyle }
672674 ref = { reference }
675+ { ...wrapperProps }
673676 { ...( TRIGGER_TO_HANDLER_MAP_ON_LEAVE [ trigger ] && ! gestureType
674677 ? {
675678 [ TRIGGER_TO_HANDLER_MAP_ON_LEAVE [ trigger ] ] : toggle (
Original file line number Diff line number Diff line change @@ -242,6 +242,12 @@ export interface TooltipProps
242242 * The Wrapper style.
243243 */
244244 wrapperStyle ?: React . CSSProperties ;
245+
246+ /**
247+ * The props of the Tooltip wrapper.
248+ * @default {}
249+ */
250+ wrapperProps ?: React . HTMLAttributes < HTMLDivElement > ;
245251}
246252
247253export type TooltipRef = {
You can’t perform that action at this time.
0 commit comments