Nomad Packaging Mechanism

    chop-lines
    TypeScript icon, indicating that this package has built-in type declarations

    1.15.7 • Public • Published

    ChopLines

    ChopLines is a lightweight React component which truncates multiple lines of HTML markup.

    CircleCI Codecov

    choplines-responsive

    Installation

    Add the dependency:

    yarn add chop-lines
    

    And then in your component(s):

    import ChopLines from 'chop-lines';
    

    Props

    Prop Type Requirement
    lines number required if maxHeight is not set
    lineHeight number required if maxHeight is not set
    maxHeight number required if lines & linesHeight are not set
    ellipsis ReactNode or ReactElement<any> Optional (default: "…")
    children ReactNode or ReactElement<any> required

    Implementation Example ›

    Requirements

    • React 16.9+

    Contributing

    ChopLines follows semantic release versioning with Commitizen.

    Committing

    Install commitizen globally, if you have not already.

    npm install -g commitizen
    

    When you are ready to commit your changes…

    git add .
    git cz
    

    Then, follow the CLI wizard.

    Note: Choosing 'feat' or adding 'BREAKING CHANGE' in the commit will result in a major version bump during the release.

    Testing

    nvm use
    yarn
    yarn test
    

    Additional Commands

    Keep things tidy

    yarn lint
    

    Test that your changes compile

    yarn build
    

    License

    MIT

    Install

    npm i chop-lines

    DownloadsWeekly Downloads

    4,765

    Version

    1.15.7

    License

    MIT

    Unpacked Size

    16.3 kB

    Total Files

    4

    Last publish

    Collaborators

    • dw2