diff --git a/src/components/ActionTooltip/ActionTooltip.tsx b/src/components/ActionTooltip/ActionTooltip.tsx index ad2b5e38b9..63c573f72c 100644 --- a/src/components/ActionTooltip/ActionTooltip.tsx +++ b/src/components/ActionTooltip/ActionTooltip.tsx @@ -9,13 +9,18 @@ import {Hotkey} from '../Hotkey'; import type {HotkeyProps} from '../Hotkey'; import {Popup} from '../Popup'; import type {PopupPlacement} from '../Popup'; -import type {DOMProps, QAProps} from '../types'; +import type {AriaLabelingProps, DOMProps, QAProps} from '../types'; import {block} from '../utils/cn'; +import {filterDOMProps} from '../utils/filterDOMProps'; import {getElementRef} from '../utils/getElementRef'; import './ActionTooltip.scss'; -export interface ActionTooltipProps extends QAProps, DOMProps, TooltipDelayProps { +export interface ActionTooltipProps + extends AriaLabelingProps, + QAProps, + DOMProps, + TooltipDelayProps { id?: string; disablePortal?: boolean; contentClassName?: string; @@ -44,15 +49,18 @@ export function ActionTooltip(props: ActionTooltipProps) { qa, id, disablePortal, - ...delayProps + openDelay, + closeDelay, + ...otherProps } = props; const [anchorElement, setAnchorElement] = React.useState(null); - const tooltipVisible = useTooltipVisible(anchorElement, delayProps); + const tooltipVisible = useTooltipVisible(anchorElement, {openDelay, closeDelay}); const renderPopup = () => { return ( { onClose, align, qa, + ...otherProps } = props; return ( {typeof props.icon === 'undefined' ? ( diff --git a/src/components/Alert/__snapshots__/Alert.test.tsx.snap b/src/components/Alert/__snapshots__/Alert.test.tsx.snap index d17001bf97..82db0a7c30 100644 --- a/src/components/Alert/__snapshots__/Alert.test.tsx.snap +++ b/src/components/Alert/__snapshots__/Alert.test.tsx.snap @@ -4,6 +4,7 @@ exports[`Alert has predicted styles if inline layout rendered 1`] = `