@fluentui/react
Version:
Reusable React components for building web experiences.
32 lines (31 loc) • 1.07 kB
TypeScript
import * as React from 'react';
import { IDocumentCardTitleProps } from './DocumentCardTitle.types';
export interface IDocumentCardTitleState {
truncatedTitleFirstPiece?: string;
truncatedTitleSecondPiece?: string;
}
/**
* {@docCategory DocumentCard}
*/
export declare class DocumentCardTitleBase extends React.Component<IDocumentCardTitleProps, IDocumentCardTitleState> {
private _titleElement;
private _classNames;
private _async;
private _events;
private _clientWidth;
private _timerId;
constructor(props: IDocumentCardTitleProps);
componentDidUpdate(prevProps: IDocumentCardTitleProps): void;
componentDidMount(): void;
componentWillUnmount(): void;
render(): JSX.Element;
/**
* In measuring, it will render a same style text with whiteSpace: 'nowrap', to get overflow rate.
* So that the logic can predict truncated text well.
*/
private get _needMeasurement();
private _truncateTitle;
private _truncateWhenInAnimation;
private _shrinkTitle;
private _updateTruncation;
}