@types/react-show-more
TypeScript icon, indicating that this package has built-in type declarations

2.0.7 • Public • Published

Installation

npm install --save @types/react-show-more

Summary

This package contains type definitions for react-show-more (https://github.com/One-com/react-show-more).

Details

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

import * as React from "react";

declare namespace ReactShowMore {
    interface ReactShowMoreProps {
        /**
         * Specifies how many lines of text should be preserved until it gets truncated. false and
         * any integer < 1 will result in the text not getting clipped at all.
         *
         * @default false
         */
        lines?: number | false | undefined;

        /**
         * The text to display in the anchor element to show more.
         *
         * @default "Show more"
         */
        more?: React.ReactNode | undefined;

        /**
         * The text to display in the anchor element to show less.
         *
         * @default "Show less"
         */
        less?: React.ReactNode | undefined;

        /**
         * The text to be truncated. Anything that can be evaluated as text.
         */
        children?: React.ReactNode | undefined;

        /**
         * Class name(s) to add to the anchor elements.
         *
         * @default ""
         */
        anchorClass?: string | undefined;
    }
}

declare class ReactShowMore extends React.Component<ReactShowMore.ReactShowMoreProps> {}
export = ReactShowMore;

Additional Details

  • Last updated: Fri, 04 Oct 2024 16:42:27 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Naor Torgeman.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-show-more

Weekly Downloads

1,765

Version

2.0.7

License

MIT

Unpacked Size

5.01 kB

Total Files

5

Last publish

Collaborators

  • types