import { TooltipProps as MuiTooltipProps } from '@material-ui/core'; import { ChangeEvent, ReactElement, ReactNode } from 'react'; import { PopperProps } from '../Popper'; export type TooltipProps = { /** * Tooltip title. If there's no title or description, the tooltip is not shown */ title?: ReactNode; /** * Tooltip description: used to provide additional information to the title. If there's no title or description, the tooltip is not shown */ description?: ReactNode; /** * Element to position a tooltip to. * * ⚠️ Has to be a *single* reffable child (use `forwardRef` for custom components) */ children: ReactElement; /** * Tooltip placement. Positions a tooltip dynamically if undefined */ placement?: MuiTooltipProps['placement']; /** * Disables the tooltip */ disabled?: boolean; /** * If `true`, the tooltip is shown. Used to programmatically control the tooltip */ open?: boolean; /** * Callback fired when the component requests to be open. */ onOpen?: (event: ChangeEvent) => void; /** * Callback fired when the component requests to be closed. */ onClose?: (event: ChangeEvent) => void; /** * The number of milliseconds to wait before showing the tooltip. * This prop won't impact the enter touch delay (`enterTouchDelay`). */ enterDelay?: number; /** * The number of milliseconds a user must touch the element before showing the tooltip. */ enterTouchDelay?: number; /** * The number of milliseconds to wait before showing the tooltip when one was already recently opened. */ enterNextDelay?: number; /** * Makes a tooltip interactive, i.e. will not close when the user * hovers over the tooltip before the `leaveDelay` is expired. */ interactive?: boolean; /** * The number of milliseconds to wait before hiding the tooltip. * This prop won't impact the leave touch delay (`leaveTouchDelay`). */ leaveDelay?: number; /** * The number of milliseconds after the user stops touching an element before hiding the tooltip. */ leaveTouchDelay?: number; anchorEl?: PopperProps['anchorEl']; /** * Will be applied to tooltip container */ className?: string; }; export declare const Tooltip: ({ children, disabled, title, interactive, className, enterDelay, leaveDelay, enterTouchDelay, leaveTouchDelay, enterNextDelay, description, anchorEl, ...rest }: TooltipProps) => JSX.Element; //# sourceMappingURL=Tooltip.d.ts.map