You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,11 @@
1
1
# react-native-rating-element
2
2
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.
4
9
5
10
## Installation
6
11
@@ -25,6 +30,17 @@ import { Rating } from "react-native-rating-element";
25
30
/>
26
31
```
27
32
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
+
28
44
## Contributing
29
45
30
46
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
0 commit comments