From 728600c021008c5ed923951c2fa4ea8298d3fd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matuzal=C3=A9m=20Teles?= Date: Wed, 19 May 2021 16:55:22 -0300 Subject: [PATCH] feat(@clayui/tooltip): Add the new ContainerProps API --- packages/clay-tooltip/src/TooltipProvider.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/clay-tooltip/src/TooltipProvider.tsx b/packages/clay-tooltip/src/TooltipProvider.tsx index 20302a231a..c10dbd24f0 100644 --- a/packages/clay-tooltip/src/TooltipProvider.tsx +++ b/packages/clay-tooltip/src/TooltipProvider.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {ClayPortal, Keys, delegate} from '@clayui/shared'; +import {ClayPortal, IPortalBaseProps, Keys, delegate} from '@clayui/shared'; import domAlign from 'dom-align'; import React, {useCallback} from 'react'; import warning from 'warning'; @@ -139,6 +139,11 @@ interface IPropsBase { */ autoAlign?: boolean; + /** + * Props to add to the . + */ + containerProps?: IPortalBaseProps; + /** * Custom function for rendering the contents of the tooltip */ @@ -171,6 +176,7 @@ const TooltipProvider: React.FunctionComponent< > = ({ autoAlign = true, children, + containerProps = {}, contentRenderer = (props) => props.title, delay = 600, scope, @@ -369,7 +375,7 @@ const TooltipProvider: React.FunctionComponent< return ( <> {show && ( - + {setAsHTML && typeof titleContent === 'string' ? (