Git Product home page Git Product logo

react-line-overflow's People

Contributors

jasminabasurita avatar jesspoemape avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-line-overflow's Issues

Throw type errors

When a user passes a non-hex value to background or passes a non-string type to ellipsis a type error should be thrown

Ramda as a dependency

IMO, ramda at XYZ version is a hefty dependency to add to a library. I would recommend creating your own helper functions that encapsulate this functionality.

If that's not reasonable, I recommend either including the packages individually or making use of https://www.npmjs.com/package/babel-plugin-transform-imports in order to not include all of ramda here.

But option #1 (own helper functions) is still the recommended one here.

add lifecycle methods

The component should:

  • recalculate css on component update
  • should only update when it's contents change in a way that effect the length of the size/length of the text (i.e. className/style or text changes

Preparing for contributors

Component always takes up maximum height allowed by number of lines

Current Behavior:

if text takes up less than what would be considered overflow in height the containing box still takes up the full height

Expected Behavior:

When lines are less than the max num lines the component should only take up as much space as the text

Probably just needs to be switched from height to max-height

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.