/** * @file Ellipsis 文本超出隐藏并显示给予提示。 */ import React, { CSSProperties, FC, MouseEventHandler, ReactNode } from 'react'; import { TooltipProps } from '../Tooltip'; declare type TooltipPropsExcludingTitle = Partial>; export interface EllipsisProps { 'data-test-id'?: string; /** * tooltip 始终显示 text. 主内容优先显示 children, 没有 children 则显示 text */ text: ReactNode; /** * 主内容优先显示 children, 没有 children 则显示 text. * children 只支持 inline 元素, 比如 , 等. */ children?: ReactNode; /** * 传给 Tooltip 的 props (除了 title),其中 mode 默认为 dark */ tooltipProps?: TooltipPropsExcludingTitle; /** * 窗口 resize 时,是否重新检测显示 Tooltip */ updateOnResize?: boolean; onClick?: MouseEventHandler; /** * 样式 */ style?: CSSProperties; className?: string; /** * 有些组件需要子组件接收一些鼠标事件才能正常运行(如 Popover、Dropdown 等) */ onMouseEnter?: (event: React.MouseEvent) => void; onMouseLeave?: (event: React.MouseEvent) => void; } export declare const Ellipsis: FC; export {};