react native starRatin component
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore Initial commit Jan 29, 2016
LICENSE Initial commit Jan 29, 2016
README.md update readme Jun 2, 2016
StarRating.js support RN 0.25 Jun 2, 2016
package.json publish 1.0.1 Jun 3, 2016

README.md

react-native-starRating

react native starRatin component

Installation

npm install react-native-starrating --save

Usage

Install the package via npm install react-native-starrating --save. Then import it in your JavaScript file via import StarRating from 'react-native-starrating'. Check out an example usage below:

import StarRating from 'react-native-starrating';

class ExampleComponent extends React.Component{
  onStarRatingPress(value) {
    console.log('Rated ' + value + ' stars!');
  }
  render() {
    return (
      <StarRating
        maxStars={5}
        rating={3}
        disabled={false}
        starSize={15}
        onStarChange={(value) => this.onStarRatingPress(value)}
      />
    );
  }
}