@blueprintjs/core
Version:
Core styles & components
34 lines (33 loc) • 1.25 kB
TypeScript
import * as React from "react";
import { AbstractPureComponent2 } from "../../common";
import { IProps } from "../../common/props";
export interface ITextProps extends IProps {
/**
* Indicates that this component should be truncated with an ellipsis if it overflows its container.
* The `title` attribute will also be added when content overflows to show the full text of the children on hover.
* @default false
*/
ellipsize?: boolean;
/**
* HTML tag name to use for rendered element.
* @default "div"
*/
tagName?: keyof JSX.IntrinsicElements;
}
export interface ITextState {
textContent: string;
isContentOverflowing: boolean;
}
export declare class Text extends AbstractPureComponent2<ITextProps, ITextState> {
static displayName: string;
state: ITextState;
private textRef;
componentDidMount(): void;
componentDidUpdate(): void;
render(): React.ReactElement<{
className: string;
ref: (ref: HTMLElement) => HTMLElement;
title: string;
}, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
private update;
}