Skip to content

Commit 44f1fde

Browse files
author
Rishabh
committed
updating readme
1 parent 6f07f8f commit 44f1fde

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# react-native-rating-element
1+
# react-native-rating-element
22

3-
A simple rating library for react native supporting decimal points and custom icon set. [Output](https://github.com/ui-ninja/react-native-rating-element#output)
3+
A simple rating library for react native supporting decimal points, direction aware and custom icon set. [Output](https://github.com/ui-ninja/react-native-rating-element#output)
44

5-
This package support varity of icons from Ionicons and support fractions. You can interact with rating icons too. [API Documentation here](https://github.com/ui-ninja/react-native-rating-element#api)
5+
This package support varity of icons from Ionicons, direction aware and support fractions. You can interact with rating icons too. [API Documentation here](https://github.com/ui-ninja/react-native-rating-element#api)
66

7-
>Please note: This package depends on [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons#installation). Please install and configure it before using this package. It is simple to install - First, install the package via `npm` and then link it using `react-native link`.
7+
> Please note: This package depends on [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons#installation). Please install and configure it before using this package. It is simple to install - First, install the package via `npm` and then link it using `react-native link`.
88
99
## Installation
1010

@@ -27,6 +27,7 @@ import { Rating } from "react-native-rating-element";
2727
size={24}
2828
readonly
2929
icon="ios-star"
30+
direction="row"
3031
/>;
3132

3233
*If you want to record user tap on star icon*
@@ -39,6 +40,7 @@ import { Rating } from "react-native-rating-element";
3940
size={24}
4041
onStarTap={position => console.log(`User pressed: ${position}`)}
4142
icon="ios-star"
43+
direction="row"
4244
/>;
4345

4446

@@ -57,10 +59,11 @@ import { Rating } from "react-native-rating-element";
5759
| `marginBetweenRatingIcon` | 1 | number | Pass in custom number to manage space or margin between the rating icons. |
5860
| `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. |
5961
| `readonly` | false | bool | If passed true, onPress event won't be fired. |
62+
| `direction` | 'row' | string | Pass any value from `[ "row", "row-reverse", "column", "column-reverse"]`. |
6063

6164
## Output
6265

63-
![Output](https://media1.giphy.com/media/RKBMM6OegB1QvfL4aY/giphy.gif)
66+
![Output](https://s7.gifyu.com/images/rating-demo-gif.gif)
6467

6568
## Contributing
6669

0 commit comments

Comments
 (0)