UNPKG

@navinc/base-react-components

Version:
36 lines (35 loc) 2.15 kB
/// <reference types="react" /> import { TooltipProps as MuiTooltipProps } from '@mui/material/Tooltip'; import { IconName } from './icons'; type CssProps = { /** Default max-width is 500px */ maxWidth?: string; /** Default is 198px. */ minWidth?: string; /** 'Set to "true" if you want a black tooltip with white text. Custom content may need to be styled for the darker background. */ isDark?: boolean; }; type TooltipProps = { children: React.ReactNode; className?: string; iconName?: IconName; target?: React.ReactNode; 'data-testid'?: string; /** Tooltip will place itself, but use this prop if you want to control where it will try to show by default. */ placement?: 'top' | 'right' | 'bottom' | 'left'; /** To be used if this is a controlled tooltip. */ open?: boolean; /** Default tooltip has the arrow indictor */ arrow?: boolean; /** Sets the default IconButton size. */ size?: string; } & CssProps & Omit<MuiTooltipProps, 'children' | 'title' | 'componentsProps'>; export declare const TooltipTargetIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{ variation?: import("./button").VariationKey | undefined; buttonAriaLabel?: string | undefined; } & Omit<import("./types").InferComponentProps<import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, import("./button").StyledButtonProps, never>>, "size"> & import("./types").InferComponentProps<import("styled-components").StyledComponent<({ name, size, ...props }: { name: IconName; size?: string | undefined; } & import("react").SVGProps<SVGSVGElement>) => JSX.Element | null, import("styled-components").DefaultTheme, {}, never>> & import("react").RefAttributes<unknown>>, import("styled-components").DefaultTheme, {}, never>; export declare const Tooltip: import("styled-components").StyledComponent<({ className, children, iconName, target, "data-testid": dataTestId, arrow, isDark, placement, size, ...props }: TooltipProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>; export {};