From 3002273e690b54c379d677c8a9b122571ab36670 Mon Sep 17 00:00:00 2001 From: Gwen Date: Sun, 14 Aug 2022 21:01:37 -0700 Subject: [PATCH 1/6] fixing onPress event + adding children option other than string --- lib/ToastContainer.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/ToastContainer.js b/lib/ToastContainer.js index e18a707..d25f9bd 100644 --- a/lib/ToastContainer.js +++ b/lib/ToastContainer.js @@ -240,6 +240,7 @@ class ToastContainer extends Component { this.props.hideOnPress ? this._hide() : null }} > + this._root = ele} > - - {this.props.children} - + {typeof this.props.children === 'string' ? ( + + {this.props.children} + + ) : ( ++ this.props.children ++ )} + : null; } From 1ce4ae5bdb14b895b2a4624c34efbbe191ae2510 Mon Sep 17 00:00:00 2001 From: Gwen Date: Mon, 19 Sep 2022 17:31:08 -0700 Subject: [PATCH 2/6] creating new npm package --- package.json | 6 +++--- yarn.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 yarn.lock diff --git a/package.json b/package.json index acadc4f..7479956 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "version": "3.3.0", - "name": "react-native-root-toast", - "description": "react native toast like component, pure javascript solution", + "version": "1.0", + "name": "groger/react-native-root-toast", + "description": "Based on react-native-root-toast library: react native toast like component, pure javascript solution. Added option to pass any children + fix onpress issue", "repository": { "type": "git", "url": "https://github.com/magicismight/react-native-root-toast" diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..2ce5e91 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,60 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@react-native/normalize-color@*": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.0.0.tgz#da955909432474a9a0fe1cbffc66576a0447f567" + integrity sha512-Wip/xsc5lw8vsBlmY2MO/gFLp3MvuZ2baBZjDeTjjndMgM0h5sxz7AZR62RDPGgstp8Np7JzjvVqVT7tpFZqsw== + +deprecated-react-native-prop-types@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-2.3.0.tgz#c10c6ee75ff2b6de94bb127f142b814e6e08d9ab" + integrity sha512-pWD0voFtNYxrVqvBMYf5gq3NA2GCpfodS1yNynTPc93AYA/KEMGeWDqqeUB6R2Z9ZofVhks2aeJXiuQqKNpesA== + dependencies: + "@react-native/normalize-color" "*" + invariant "*" + prop-types "*" + +invariant@*: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +loose-envify@^1.0.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +prop-types@*, prop-types@^15.5.10: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-native-root-siblings@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/react-native-root-siblings/-/react-native-root-siblings-4.1.1.tgz#b7742db7634a87f507eb99a5fd699c4f10c46ab0" + integrity sha512-sdmLElNs5PDWqmZmj4/aNH4anyxreaPm61c4ZkRiR8SO/GzLg6KjAbb0e17RmMdnBdD0AIQbS38h/l55YKN4ZA== From c63ae935db693c58d91ffd9dc850c4cc34c213a6 Mon Sep 17 00:00:00 2001 From: Gwen Date: Mon, 19 Sep 2022 17:38:25 -0700 Subject: [PATCH 3/6] update name --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7479956..f5fb704 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "version": "1.0", - "name": "groger/react-native-root-toast", + "name": "@gwroger/react-native-root-toast", "description": "Based on react-native-root-toast library: react native toast like component, pure javascript solution. Added option to pass any children + fix onpress issue", "repository": { "type": "git", From dbd15a86f50833521675be1b270434ede37a3a27 Mon Sep 17 00:00:00 2001 From: Gwen Date: Mon, 19 Sep 2022 17:38:56 -0700 Subject: [PATCH 4/6] update v --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f5fb704..1ff215a 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.0", + "version": "1.0.0", "name": "@gwroger/react-native-root-toast", "description": "Based on react-native-root-toast library: react native toast like component, pure javascript solution. Added option to pass any children + fix onpress issue", "repository": { From 093aa95ca1fcb7b4e1819c75f5a2fb6256e86817 Mon Sep 17 00:00:00 2001 From: Gwen Date: Mon, 19 Sep 2022 17:49:51 -0700 Subject: [PATCH 5/6] changing url --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1ff215a..da05b43 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Based on react-native-root-toast library: react native toast like component, pure javascript solution. Added option to pass any children + fix onpress issue", "repository": { "type": "git", - "url": "https://github.com/magicismight/react-native-root-toast" + "url": "https://github.com/groger/react-native-root-toast" }, "license": "MIT", "main": "./index.js", From 629914d3da78e968e388360e59f978ec2e0e158a Mon Sep 17 00:00:00 2001 From: Gwen Date: Mon, 19 Sep 2022 17:53:14 -0700 Subject: [PATCH 6/6] upgrade v package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da05b43..0045810 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.2", "name": "@gwroger/react-native-root-toast", "description": "Based on react-native-root-toast library: react native toast like component, pure javascript solution. Added option to pass any children + fix onpress issue", "repository": {