@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
39 lines (38 loc) • 1.49 kB
TypeScript
import { ChildrenProp } from "../core/types.js";
import "../core/index.js";
import { LinkProps } from "../link/link.types.js";
import "../link/index.js";
import { ReactNode } from "react";
import { Placement } from "@floating-ui/react";
//#region src/tooltip/tooltip.types.d.ts
interface TooltipProps extends ChildrenProp {
/** Font size. */
fontSize?: '16px' | '14px';
/** Displays given text or component as the tooltip. */
text?: ReactNode;
/** Tooltip position. */
placement?: Placement;
/** Sets correspondent disabled styling */
disabled?: boolean;
/** Sets maximum width to the tooltip body. */
maxWidth?: string;
/** Sets minimum width to the tooltip body. */
minWidth?: string;
/** Link text that will be concatenated to the end of the tooltip text. */
linkText?: string;
/** The <Link /> props. */
linkProps?: LinkProps;
/** Keeping the tooltip always visible @default false */
visible?: boolean;
/** Offset of the tooltip from the target element */
offset?: [number, number];
/** CSS white-space property @default 'pre-wrap' */
whiteSpace?: 'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line' | 'break-spaces';
/** CSS word-break property @default 'break-all' */
wordBreak?: 'normal' | 'break-all' | 'keep-all' | 'break-word';
/** The root element to render the tooltip into. Defaults to document.body. */
portalRoot?: HTMLElement | null;
}
//#endregion
export { TooltipProps };
//# sourceMappingURL=tooltip.types.d.ts.map