npm.io
0.19.0 • Published 2 years ago

@types/react-text-truncate

Licence
MIT
Version
0.19.0
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/react-text-truncate

Summary

This package contains type definitions for react-text-truncate (https://github.com/ShinyChang/react-text-truncate).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-text-truncate.

index.d.ts

import * as React from "react";

declare namespace TextTruncate {
    interface TextTruncateProps {
        containerClassName?: string | undefined;
        /** @default "div" */
        element?: string | undefined;
        /** @default 1 */
        line?: number | boolean | undefined;
        onCalculated?: (() => void) | undefined;
        onTruncated?: (() => void) | undefined;
        onToggled?: ((truncated: boolean) => void) | undefined;
        /** @default "" */
        text?: string | undefined;
        /** @default "span" */
        textElement?: React.ReactNode | undefined;
        textTruncateChild?: React.ReactNode | undefined;
        /** @default "..." */
        truncateText?: string | undefined;
        /** @default 10 */
        maxCalculateTimes?: number | undefined;
    }
}

declare class TextTruncate extends React.Component<TextTruncate.TextTruncateProps> {}

export = TextTruncate;

Additional Details

  • Last updated: Mon, 23 Sep 2024 1857 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Adrien Antoine.