From c01760b7a9918e5d3d06ae2a7ca7ceca453b3dd9 Mon Sep 17 00:00:00 2001 From: Rafael Caferati Date: Sun, 17 Mar 2019 10:52:22 -0300 Subject: [PATCH 1/4] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a21e4ca..23f9e1e 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,9 @@ function Button() { | textFamily | `Number` | `null` | Button default label text font family | | style                 | `Style`     | `null`   | Button container custom styles | +## React web version +Checkout the web version of the Awesome Button UI component at [rcaferati/react-awesome-button](https://github.com/rcaferati/react-awesome-button) + ## About the Author #### Rafael Caferati From 1ba72f69486c5e39e81697b90b2336ad0dfd5f4a Mon Sep 17 00:00:00 2001 From: Rafael Caferati Date: Sun, 17 Mar 2019 10:52:57 -0300 Subject: [PATCH 2/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 23f9e1e..f646d97 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,8 @@ function Button() { ## React web version Checkout the web version of the Awesome Button UI component at [rcaferati/react-awesome-button](https://github.com/rcaferati/react-awesome-button) +[](https://caferati.me/demo/react-awesome-button) + ## About the Author #### Rafael Caferati From d67de890bb0b4944c50c90f59ae0733f0d4d817f Mon Sep 17 00:00:00 2001 From: Rafael Caferati Date: Sun, 17 Mar 2019 10:53:50 -0300 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f646d97..a56fbc5 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ function Button() { | textFamily | `Number` | `null` | Button default label text font family | | style                 | `Style`     | `null`   | Button container custom styles | -## React web version +## Web version Checkout the web version of the Awesome Button UI component at [rcaferati/react-awesome-button](https://github.com/rcaferati/react-awesome-button) [](https://caferati.me/demo/react-awesome-button) From 2209e5c67d2ca76963d8f2740bb5ba792809e4aa Mon Sep 17 00:00:00 2001 From: Rafael Caferati Date: Mon, 18 Mar 2019 11:56:08 -0300 Subject: [PATCH 4/4] fix press actioon --- demo/.expo/packager-info.json | 12 ++++++------ demo/package-lock.json | 6 +++--- demo/package.json | 2 +- src/index.js | 13 +++++++------ 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/demo/.expo/packager-info.json b/demo/.expo/packager-info.json index 7391ba7..ceb9f6a 100644 --- a/demo/.expo/packager-info.json +++ b/demo/.expo/packager-info.json @@ -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 } \ No newline at end of file diff --git a/demo/package-lock.json b/demo/package-lock.json index 5aac36c..243ae4a 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -7421,9 +7421,9 @@ "integrity": "sha1-/eSsxl7qWF0osWTQw3FqQhKaaOQ=" }, "react-native-really-awesome-button": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/react-native-really-awesome-button/-/react-native-really-awesome-button-1.4.0.tgz", - "integrity": "sha512-Ib9sy798szOx/m0AnxKuETuJexysoprbwmpGZkdhB+QsOg8RFomKcX1lvqANc/EQxwrCJJRCSaHXGkwujdeq7Q==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/react-native-really-awesome-button/-/react-native-really-awesome-button-1.4.1.tgz", + "integrity": "sha512-inPImrssFSvZNYh54GEIPRbyY0vG+qQF50INkq3risyoIeZQT91r/wtlJcZL1cWXHVByu0a7VNvt6lk2YBf+9g==" }, "react-native-reanimated": { "version": "1.0.0-alpha.11", diff --git a/demo/package.json b/demo/package.json index 4d72f49..68c86d5 100644 --- a/demo/package.json +++ b/demo/package.json @@ -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": { diff --git a/src/index.js b/src/index.js index aefc8e9..e139cfe 100644 --- a/src/index.js +++ b/src/index.js @@ -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); };