UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

38 lines (35 loc) 1.51 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { PropsWithChildren, ReactNode } from 'react'; type Position = 'top' | 'bottom' | 'left' | 'right'; type TooltipProps = PropsWithChildren<{ tooltip: ReactNode; /** * Number of milliseconds until the tooltip appears * * defaults to 1000ms */ animationDelay?: number; /** * Class names of additional styling properties for the tooltip */ tooltipClassName?: string; /** * Class names of additional styling properties for the container from which the tooltip will be created */ containerClassName?: string; position?: Position; zIndex?: number; }>; /** * A Component for showing a tooltip when hovering over Content * @param tooltip The tooltip to show can be a text or any ReactNode * @param children The Content for which the tooltip should be created * @param animationDelay The delay before the tooltip appears * @param tooltipClassName Additional ClassNames for the Container of the tooltip * @param containerClassName Additional ClassNames for the Container holding the content * @param position The direction of the tooltip relative to the Container * @param zIndex The z Index of the tooltip (you may require this when stacking modal) * @constructor */ declare const Tooltip: ({ tooltip, children, animationDelay, tooltipClassName, containerClassName, position, zIndex, }: TooltipProps) => react_jsx_runtime.JSX.Element; export { Tooltip, type TooltipProps };