1.15.7 • Published 4 years ago

chop-lines v1.15.7

Weekly downloads
3,656
License
MIT
Repository
github
Last release
4 years ago

ChopLines

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

npm.io CircleCI npm.io Codecov

choplines-responsive

Installation

Add the dependency:

yarn add chop-lines

And then in your component(s):

import ChopLines from 'chop-lines';

Props

PropTypeRequirement
linesnumberrequired if maxHeight is not set
lineHeightnumberrequired if maxHeight is not set
maxHeightnumberrequired if lines & linesHeight are not set
ellipsisReactNode or ReactElement<any>Optional (default: "")
childrenReactNode 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

1.15.7

4 years ago

1.15.4

4 years ago

1.15.3

4 years ago

1.15.6

4 years ago

1.15.5

4 years ago

1.15.2

4 years ago

1.15.1

4 years ago

1.15.0

4 years ago

1.14.1

5 years ago

1.14.0

5 years ago

1.13.5

5 years ago

1.13.4

5 years ago

1.13.3

5 years ago

1.13.2

5 years ago

1.13.1

5 years ago

1.13.0

5 years ago

1.12.0

5 years ago

1.11.0

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago