import * as React from "react"; import { type PopperProps } from "../Popper"; import type { MergeElementProps } from "../typings"; interface TooltipBaseProps { /** * The tooltip will be added relative to this node. */ children: React.ReactElement; /** * Append to the classNames applied to the component so you can override or * extend the styles. */ className?: string; /** * The text content of the tooltip. */ text: string; /** * Tooltip placement. It will be auto updated when `autoPlacement={true}`. * * @default "top" */ placement?: PopperProps["side"]; /** * By enabling this option, tooltip chooses the placement automatically * (the one with the most space available) * and ignores the `placement` property value. * * @default false */ autoPlacement?: PopperProps["autoPlacement"]; /** * The tooltip will be triggered by this event.\ * **Note**: choosing `"mouseMove"` will disable `autoPlacement` property. * @default "hover" */ triggersOn?: "hover" | "click" | "mouseMove"; /** * If `true`, the tooltip will have an arrow tail. * @default false */ tailed?: boolean; /** * If `true`, the tooltip will be open. */ open?: boolean; /** * If `true`, the tooltip will be open on mount. Use when the component is not controlled. */ defaultOpen?: boolean; /** * The Callback fires when user has clicked outside of the tooltip. */ onOutsideClick?: (event: MouseEvent) => void; /** * The Callback fires when the component requests to be closed. */ onClose?: (event: React.SyntheticEvent | Event) => void; /** * The Callback fires when the component requests to be opened. */ onOpen?: (event: React.SyntheticEvent | Event) => void; } export declare type TooltipProps = Omit, "defaultValue" | "defaultChecked">; declare type Component = { (props: TooltipProps): React.ReactElement | null; propTypes?: React.WeakValidationMap | undefined; displayName?: string | undefined; }; declare const Tooltip: Component; export default Tooltip;