Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rcaferati/react-native-really-awe…
Browse files Browse the repository at this point in the history
…some-button
  • Loading branch information
rcaferati committed Mar 18, 2019
2 parents e5cbf0f + 6c53fed commit 22382c6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ function Button() {
| textFamily | `Number` | `null` | Button default label text font family |
| style                 | `Style`     | `null`   | Button container custom styles |

## Web version
Checkout the web version of the Awesome Button UI component at [rcaferati/react-awesome-button](https://github.com/rcaferati/react-awesome-button)

[<img src="https://github.com/rcaferati/react-awesome-button/blob/master/demo/public/images/react-awesome-button-customizer.png?raw=true" width="800" />](https://caferati.me/demo/react-awesome-button)

## About the Author

#### Rafael Caferati
Expand Down
12 changes: 6 additions & 6 deletions demo/.expo/packager-info.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"devToolsPort": 19002,
"expoServerPort": null,
"packagerPort": null,
"packagerPid": null,
"expoServerNgrokUrl": null,
"packagerNgrokUrl": null,
"ngrokPid": null
"expoServerPort": 19000,
"packagerPort": 19001,
"packagerPid": 1665,
"expoServerNgrokUrl": "https://in-qqr.rcaferati.demo.exp.direct",
"packagerNgrokUrl": "https://packager.in-qqr.rcaferati.demo.exp.direct",
"ngrokPid": 1754
}
6 changes: 3 additions & 3 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"expo": "^32.0.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-really-awesome-button": "1.4.1",
"react-native-really-awesome-button": "1.4.2",
"react-navigation": "^3.0.9"
},
"devDependencies": {
Expand Down
13 changes: 7 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,24 +198,25 @@ export default class Button extends React.Component {
duration: ANIMATED_TIMING_OFF,
callback: () => {
this.pressing = false;
this.press();
}
});
};

pressOut = () => {
if (
this.props.disabled === true ||
!this.props.children ||
this.animating === true
) {
if (this.props.disabled === true || !this.props.children) {
return false;
}
if (this.animating === true) {
this.press();
return;
}
if (this.pressing === false) {
this.press();
this.release();
return;
}
this.timeout = setTimeout(() => {
this.press();
this.release();
}, ANIMATED_TIMING_OFF / 2.5);
};
Expand Down

0 comments on commit 22382c6

Please sign in to comment.