Giter VIP home page Giter VIP logo

ui-ninja / react-native-rating-element Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 4.0 2.37 MB

A simple rating library for react native supporting: decimal points, direction aware icons, custom icon set from Ionicons, custom images and record rating given by users.

License: MIT License

JavaScript 100.00%
react-native rating star-rating-component star-rating decimal-point-rating ionicons ratings

react-native-rating-element's People

Contributors

dependabot[bot] avatar relax594 avatar ui-ninja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-rating-element's Issues

Typescript issue

It seems that this library is missing a type definition file and there is none added so far in DefinitelyTyped repo, will that be added in the future? I'm pretty new to typescript myself, so I'm not really sure I can add one.

[Feature Request] Custom Images as Rating

Instead of defining just an icon, let us define a type with ["icon", "custom"] (defaults to icon) and if we set the type to custom, we can use an custom image (for example a .png file). This way we would be able to setup something like this:
Unbenannt

Thanks a lot!

Bug: column-reverse not working properly

Hi,
It works well with direction="column", but when direction is set to column-reverse, the views are not aligned and coloredIcons are not drawn from bottom to up.

<Rating
        rated={0.5}
        totalCount={1}
        ratingColor="#f1c644"
        ratingBackgroundColor="#d4d4d4"
        size={100}
        readonly
        icon="ios-star"
        direction="column" // direction="column-reverse"
      />
direction="column" direction="column-reverse"
image image

onIconTap is not a function

Running this

<Rating size={48} totalCount={1} rated={stern1} />

and clicking on it crashes the app because of

ERROR TypeError: onIconTap is not a function. (In 'onIconTap(position + 1)', 'onIconTap' is undefined)

There is never a check if this function exists and from reading the docs there is no need to define this function.

Please either check if the function exists (which should be the way to go anyways) or update the docs :) Thanks!

Add support for accessibility when tapping on rating icon

Before raising issue, first thanks for creating this library. ๐Ÿ˜ƒ

During usage of library, I found that when talkback is active,

  • for readonly ratings its accessing child icons as well, instead I think it should read out something like "rated x out of x" on parent view
  • for tappable icons, it is reading nothing.

Thanks!

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.