UNPKG

1.49 kBTypeScriptView Raw
1import * as React from "react";
2import { AbstractPureComponent2 } from "../../common";
3import { Props } from "../../common/props";
4export declare type TextProps = ITextProps;
5/** @deprecated use TextProps */
6export interface ITextProps extends Props {
7 /**
8 * Indicates that this component should be truncated with an ellipsis if it overflows its container.
9 * The `title` attribute will also be added when content overflows to show the full text of the children on hover.
10 *
11 * @default false
12 */
13 ellipsize?: boolean;
14 /**
15 * HTML tag name to use for rendered element.
16 *
17 * @default "div"
18 */
19 tagName?: keyof JSX.IntrinsicElements;
20 /**
21 * HTML title of the element
22 */
23 title?: string;
24}
25export interface ITextState {
26 textContent: string;
27 isContentOverflowing: boolean;
28}
29export declare class Text extends AbstractPureComponent2<TextProps, ITextState> {
30 static displayName: string;
31 static defaultProps: Partial<TextProps>;
32 state: ITextState;
33 private textRef;
34 componentDidMount(): void;
35 componentDidUpdate(): void;
36 render(): React.ReactElement<{
37 className: string;
38 ref: (ref: HTMLElement | null) => HTMLElement | null;
39 title: string | undefined;
40 }, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>;
41 private update;
42}
43
\No newline at end of file