/rating-component

Rating Component build in ReactJS

Primary LanguageJavaScript

:rage: <---- Rating Component ----> :satisfied:

Before you start

Make sure you have Node.js installed.

Getting started

  • npm install

  • npm run start - starts the application locally

Other commands...

$ npm build                     # Create dist folder with index and .js files
$ npm run test                  # Runs the unit tests
$ npm run test:watch            # Runs the unit tests with the flag `--watch` (useful for TDD)

Usage

-Default usage <StarRating /> -Custom usage <StarRating textButton="Submit Review" numberOfStars="7"/>

  • description -- Description to display. The default is Rate this product.
  • textButton -- Text to be shown in the button. The default is Apply
  • successMessage -- Message to display when submitted. The Default is Thanks for your rating!
  • numberOfStars -- How many stars to display, lower than 7. The default is 5