Skip to content

Commit 1a89200

Browse files
authored
Merge pull request #13 from ui-ninja/readme-update-for-readonly-prop
Readme update for readonly prop
2 parents 2100242 + a0de7f1 commit 1a89200

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,21 @@ import { Rating } from "react-native-rating-element";
6767

6868
## API
6969

70-
| prop | default | type | description |
71-
| ------------------------- | ---------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
72-
| `rated` | 0 | number | Represents Initial value for the rating. |
73-
| `totalCount` | 5 | number | Number of background stars to show. For ex. Rated 5 out of 10 stars. The 10 value is `totalCount` |
74-
| `type` | `icon` | string | If you want custom images, then pass `custom` as prop value. <br />In case of `custom`, Make sure to pass `selectedIconImage` and `emptyIconImage`. |
75-
| `selectedIconImage` | - | image path (node) | Pass in custom path for selected icon. For ex. `selectedIconImage={require('../pathToImage/image.png}`. |
76-
| `emptyIconImage` | - | image path (node) | Pass in custom path for selected icon. For ex. `emptyIconImage={require('../pathToImage/image.png}`. |
77-
| `readonly` | false | bool | If passed true, onPress event won't be fired. |
78-
| `direction` | 'row' | string | Pass any value from `[ "row", "row-reverse", "column", "column-reverse"]`. | |
79-
| `onIconTap` | - | 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. |
80-
| `ratingColor` | #f1c644 | string (color) | Pass in a custom color to fill-color the rating icon. |
81-
| `ratingBackgroundColor` | #d4d4d4 | string (color) | Pass in a custom fill-color for the background of rating icon. It is sometimes referred as empty icon. |
82-
| `size` | 24 | number | Pass in a custom font size for the icon |
83-
| `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 |
84-
| `marginBetweenRatingIcon` | 1 | number | Pass in custom number to manage space or margin between the rating icons. |
70+
| prop | default | type | description |
71+
| ------------------------- | ---------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
72+
| `rated` | 0 | number | Represents Initial value for the rating. |
73+
| `totalCount` | 5 | number | Number of background stars to show. For ex. Rated 5 out of 10 stars. The 10 value is `totalCount` |
74+
| `type` | `icon` | string | If you want custom images, then pass `custom` as prop value. <br />In case of `custom`, Make sure to pass `selectedIconImage` and `emptyIconImage`. |
75+
| `selectedIconImage` | - | image path (node) | Pass in custom path for selected icon. For ex. `selectedIconImage={require('../pathToImage/image.png}`. |
76+
| `emptyIconImage` | - | image path (node) | Pass in custom path for selected icon. For ex. `emptyIconImage={require('../pathToImage/image.png}`. |
77+
| `readonly` | false | bool | If passed true, `onIconTap` event won't be fired. |
78+
| `direction` | 'row' | string | Pass any value from `[ "row", "row-reverse", "column", "column-reverse"]`. | |
79+
| `onIconTap` | - | 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. Please note: This won't be triggered if `readonly` is passed as true. |
80+
| `ratingColor` | #f1c644 | string (color) | Pass in a custom color to fill-color the rating icon. |
81+
| `ratingBackgroundColor` | #d4d4d4 | string (color) | Pass in a custom fill-color for the background of rating icon. It is sometimes referred as empty icon. |
82+
| `size` | 24 | number | Pass in a custom font size for the icon |
83+
| `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 |
84+
| `marginBetweenRatingIcon` | 1 | number | Pass in custom number to manage space or margin between the rating icons. |
8585

8686
## Output
8787

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": "5.1.3",
3+
"version": "5.1.5",
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)