Skip to content

Commit 855d0f0

Browse files
authored
Merge pull request #2 from ui-ninja/interactive-rating-icons
Interactive rating icons
2 parents 25fea00 + 8585ca1 commit 855d0f0

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ If you want to record user tap on star
4747

4848
## API
4949

50-
| prop | default | type | description |
51-
| ------------------------- | ------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52-
| `rated` | 0 | number | Represents Initial value for the rating. |
53-
| `totalCount` | 5 | number | Number of background stars to show. For ex. Rated 5 out of 10 stars. The 10 value is `totalCount` |
54-
| `ratingColor` | #b5121b | string (color) | Pass in a custom color to fill-color the rating icon. |
55-
| `ratingBackgroundColor` | #c8c7c8 | string (color) | Pass in a custom fill-color for the background of rating icon. It is sometimes referred as empty icon. |
56-
| `size` | 24 | number | Pass in a custom font size for the icon |
57-
| `icon` | 25 | number | Pass in a custom text for the icon. For ex. 'beer', 'bulb'. These icons are imported from package [react-native-vector-icons](https://oblador.github.io/react-native-vector-icons/). Please Note: For now this package only support Ionicons |
58-
| `marginBetweenRatingIcon` | 2 | number | Pass in custom number to manage space or margin between the rating icons. |
59-
| `onStarTap` | - | func | On press of star icon by user, this function will be invoked with `position` paramter. For ex. when user taps on 4 rating, this function will be invoked and in `position` parameter you will get value 4. |
60-
| `readonly` | false | bool | If passed true, onPress event wont be fired. |
50+
| prop | default | type | description |
51+
| ------------------------- | ---------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52+
| `rated` | 0 | number | Represents Initial value for the rating. |
53+
| `totalCount` | 5 | number | Number of background stars to show. For ex. Rated 5 out of 10 stars. The 10 value is `totalCount` |
54+
| `ratingColor` | #b5121b | string (color) | Pass in a custom color to fill-color the rating icon. |
55+
| `ratingBackgroundColor` | #c8c7c8 | string (color) | Pass in a custom fill-color for the background of rating icon. It is sometimes referred as empty icon. |
56+
| `size` | 24 | number | Pass in a custom font size for the icon |
57+
| `icon` | 'ios-star' | string | Pass in a custom text for the icon. For ex. 'beer', 'bulb'. These icons are imported from package [react-native-vector-icons](https://oblador.github.io/react-native-vector-icons/). Please Note: For now this package only support Ionicons |
58+
| `marginBetweenRatingIcon` | 1 | number | Pass in custom number to manage space or margin between the rating icons. |
59+
| `onStarTap` | - | func | On press of star icon by user, this function will be invoked with `position` paramter. For ex. when user taps on 4 rating, this function will be invoked and in `position` parameter you will get value 4. |
60+
| `readonly` | false | bool | If passed true, onPress event won't be fired. |
6161

6262
## Output
6363

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-rating-element",
3-
"version": "3.0.0",
3+
"version": "4.0.1",
44
"description": "A simple rating library for react native supporting decimal point and custom icon set",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)