UNPKG

@fluentui/react

Version:

Reusable React components for building web experiences.

35 lines (34 loc) 1.25 kB
import * as React from 'react'; import type { IDocumentCardTitleProps } from './DocumentCardTitle.types'; import type { JSXElement } from '@fluentui/utilities'; export interface IDocumentCardTitleState { truncatedTitleFirstPiece?: string; truncatedTitleSecondPiece?: string; } /** * {@docCategory DocumentCard} */ export declare class DocumentCardTitleBase extends React.Component<IDocumentCardTitleProps, IDocumentCardTitleState> { static contextType: React.Context<import("@fluentui/react-window-provider").WindowProviderProps>; context: any; private _titleElement; private _classNames; private _async; private _events; private _clientWidth; private _timerId; constructor(props: IDocumentCardTitleProps); componentDidUpdate(prevProps: IDocumentCardTitleProps): void; componentDidMount(): void; componentWillUnmount(): void; render(): JSXElement; /** * 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; }