From e8ad181f1850ec2b84e6d8a9ac74b69d2198a596 Mon Sep 17 00:00:00 2001 From: Debajyoti Das Date: Tue, 2 Aug 2022 18:48:52 +0530 Subject: [PATCH] Fix 'ViewPropTypes has been removed...' error --- package.json | 5 +++- src/MentionsTextInput.js | 7 ++++-- yarn.lock | 51 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 74c4ebe..fed68fb 100644 --- a/package.json +++ b/package.json @@ -21,5 +21,8 @@ "bugs": { "url": "https://github.com/harshq/react-native-mentions/issues" }, - "homepage": "https://github.com/harshq/react-native-mentions#readme" + "homepage": "https://github.com/harshq/react-native-mentions#readme", + "dependencies": { + "deprecated-react-native-prop-types": "^2.3.0" + } } diff --git a/src/MentionsTextInput.js b/src/MentionsTextInput.js index 41d9d6b..55d013f 100644 --- a/src/MentionsTextInput.js +++ b/src/MentionsTextInput.js @@ -5,9 +5,12 @@ import { Animated, TextInput, FlatList, - ViewPropTypes } from 'react-native'; import PropTypes from 'prop-types'; +import { + ViewPropTypes, + TextPropTypes, +} from "deprecated-react-native-prop-types"; export default class MentionsTextInput extends Component { constructor() { @@ -137,7 +140,7 @@ export default class MentionsTextInput extends Component { } MentionsTextInput.propTypes = { - textInputStyle: TextInput.propTypes.style, + textInputStyle: TextPropTypes.style, suggestionsPanelStyle: ViewPropTypes.style, loadingComponent: PropTypes.oneOfType([ PropTypes.func, diff --git a/yarn.lock b/yarn.lock index fb57ccd..691cffe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,3 +2,54 @@ # 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@*: + 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==