Skip to content

Commit

Permalink
Merge pull request #6 from f0rr0/fixProps
Browse files Browse the repository at this point in the history
Fix props
  • Loading branch information
f0rr0 authored Sep 1, 2017
2 parents 00d09e8 + 922b80a commit b771f89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-rating",
"version": "2.0.2",
"version": "2.0.3",
"description": "A stars rating component for react-native built with the Animated API",
"main": "./src/rating.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Refer to the `propTypes` and `defaultProps` definition below:
static propTypes = {
max: PropTypes.number,
initial: PropTypes.number,
onChange: PropTypes.func.isRequired,
onChange: PropTypes.func,
config: PropTypes.shape({
easing: PropTypes.func.isRequired,
duration: PropTypes.number.isRequired
Expand All @@ -64,6 +64,7 @@ static propTypes = {
static defaultProps = {
max: 5,
initial: 0,
onChange: () => {},
config: {
easing: Easing.elastic(1),
duration: 400
Expand Down
3 changes: 2 additions & 1 deletion src/rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class Rating extends PureComponent {
static propTypes = {
max: PropTypes.number,
initial: PropTypes.number,
onChange: PropTypes.func.isRequired,
onChange: PropTypes.func,
config: PropTypes.shape({
easing: PropTypes.func.isRequired,
duration: PropTypes.number.isRequired
Expand All @@ -68,6 +68,7 @@ export default class Rating extends PureComponent {
static defaultProps = {
max: 5,
initial: 0,
onChange: () => {},
config: {
easing: Easing.elastic(1),
duration: 400
Expand Down

0 comments on commit b771f89

Please sign in to comment.