import { type ReactElement, type ReactNode } from 'react'; import { type DataTestId, type MaskingProps, type StylingProps, type DOMProps } from '@dynatrace/strato-components/core'; /** * @public */ export interface TooltipBaseProps extends DOMProps, StylingProps, DataTestId, MaskingProps { /** Single child of the tooltip considered to trigger the tooltip element. */ children: ReactElement; /** * Defines if the tooltip is disabled or not. * @defaultValue false */ disabled?: boolean; /** * Placement of the tooltip relative to its trigger element. * @defaultValue 'top' */ placement?: 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end'; /** * Defines if the tooltip should be open initially when used uncontrolled. * @defaultValue false */ defaultOpen?: boolean; /** * Defines if the tooltip is open / closed in a controlled component. In * this case, you need to react to `onOpenChange` yourself in order * to open and close the tooltip. */ open?: boolean; /** * Defines the type of delay which is used for the tooltip. * @defaultValue 'default' */ delay?: 'default' | 'none'; /** Callback fired when the tooltip opens. */ onOpenChange?: (isOpen: boolean) => void; /** Array of placements to be used as fallback if the tooltip doesn't fit at the specified placement. */ fallbackPlacements?: Array<'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end'>; } /** * @public */ export interface TooltipProps extends TooltipBaseProps { /** Text displayed in the tooltip component. */ text: ReactNode; } /** * Use the `Tooltip` component to show additional text on hover and click on its trigger element. * The trigger element can only be an interactive element, like a button or input. * @public */ export declare const Tooltip: (props: TooltipProps & import("react").RefAttributes) => React.ReactElement | null;