@trussworks/react-uswds
Version:
React USWDS 3 component library
19 lines (18 loc) • 819 B
TypeScript
import { ForwardRefExoticComponent, ReactNode, JSX } from 'react';
type TooltipProps<T> = {
label: ReactNode;
title?: string;
position?: 'top' | 'bottom' | 'left' | 'right' | undefined;
wrapperclasses?: string;
className?: string;
children: ReactNode;
} & T;
interface WithCustomTooltipProps<T> {
asCustom: ForwardRefExoticComponent<T>;
}
export type DefaultTooltipProps = TooltipProps<JSX.IntrinsicElements['button']>;
export type CustomTooltipProps<T> = TooltipProps<T> & WithCustomTooltipProps<T>;
export declare function isCustomProps<T>(props: DefaultTooltipProps | CustomTooltipProps<T>): props is CustomTooltipProps<T>;
export declare function Tooltip(props: DefaultTooltipProps): JSX.Element;
export declare function Tooltip<T>(props: CustomTooltipProps<T>): JSX.Element;
export {};