UNPKG

tango-ui-cw

Version:

A lightweight ui library with ClayW

32 lines (27 loc) 870 B
import type { CSSProperties, ReactNode } from "react"; import type { SxValue } from "../CSSFab"; export type TooltipPlacement = "top" | "bottom" | "left" | "right"; export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> { /** 触发元素 */ children?: ReactNode; /** 提示内容 */ title?: ReactNode; /** 弹出方向 */ placement?: TooltipPlacement; /** 受控模式:是否可见 */ open?: boolean; /** 非受控默认是否可见 */ defaultOpen?: boolean; /** 可见状态变化回调 */ onOpenChange?: (open: boolean) => void; /** 是否禁用提示 */ disabled?: boolean; /** 样式扩展 */ sx?: SxValue; style?: CSSProperties; className?: string; } declare const Tooltip: React.ForwardRefExoticComponent< TooltipProps & React.RefAttributes<HTMLDivElement> >; export default Tooltip;