Skip to content

Commit 3feaffd

Browse files
author
Rishabh
committed
updating readme
1 parent d4a6312 commit 3feaffd

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# react-native-rating-element
22

3-
A simple rating library for react native supporting decimal point and custom icon set
3+
A simple rating library for react native supporting decimal point and custom icon set.
4+
5+
I created this small library as [react-native-ratings](https://github.com/Monte9/react-native-ratings) package was causing UI issues in Android device, when applied withing touchable opacity element.
6+
Also the <AirbnbRating /> component, does not support fractions.
7+
8+
This package works perfectly on android's TouchableOpacity, support icons from Ionicons and also support fractions.
49

510
## Installation
611

@@ -25,6 +30,17 @@ import { Rating } from "react-native-rating-element";
2530
/>
2631
```
2732

33+
## API
34+
35+
| prop | default | type | description |
36+
| ---- | ---- | ----| ---- |
37+
| `rated` | 0 | number | Represents Initial value for the rating. |
38+
| `totalCount` | 5 | number | Number of background stars to show. For ex. Rated 5 out of 10 stars. The 10 value is `totalCount` |
39+
| `ratingColor` | #b5121b | string (color) | Pass in a custom color to fill-color the rating icon. |
40+
| `ratingBackgroundColor`| #c8c7c8 | string (color) | Pass in a custom fill-color for the background of rating icon. It is sometimes referred as empty icon. |
41+
| `size` | 24 | number | Pass in a custom font size for the icon |
42+
| `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 |
43+
2844
## Contributing
2945

3046
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

0 commit comments

Comments
 (0)