@quanxi/ui
Version:
全悉组件库
24 lines (23 loc) • 678 B
TypeScript
/// <reference types="react" />
import './useOverflowShow.scss';
export interface UseOverflowShowArgs {
children?: React.ReactNode;
/** children的父容器样式 */
style?: React.CSSProperties;
/** children的父容器类名 */
className?: string;
/** children的父容器宽度 */
width?: number | string;
/**
* 超过多少行后省略
* @default 1
*/
maxLines?: number;
}
export interface UseOverflowShowRes {
/** children是否超出容器 */
isOverflow: boolean;
/** 新的children */
newChildren: React.ReactNode;
}
export declare function useOverflowShow(args: UseOverflowShowArgs): UseOverflowShowRes;