From ee527cb8315c201955ddf4f6b09a9cc0d7441b8e Mon Sep 17 00:00:00 2001 From: hugoalkimim Date: Fri, 2 Sep 2022 14:06:24 -0300 Subject: [PATCH] fix: ViewPropTypes deprecation error --- index.js | 2 +- package.json | 3 +++ src/SketchCanvas.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 79358429..2a998b52 100644 --- a/index.js +++ b/index.js @@ -5,8 +5,8 @@ import ReactNative, { Text, TouchableOpacity, FlatList, - ViewPropTypes, } from 'react-native' +import {ViewPropTypes} from 'deprecated-react-native-prop-types' import SketchCanvas from './src/SketchCanvas' import { requestPermissions } from './src/handlePermissions'; diff --git a/package.json b/package.json index bc79adb0..eb5918c6 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,9 @@ "svg", "draw" ], + "dependencies": { + "deprecated-react-native-prop-types": "^2.3.0" + }, "nativePackage": true, "license": "MIT" } \ No newline at end of file diff --git a/src/SketchCanvas.js b/src/SketchCanvas.js index 8f4fe48f..6bbde86b 100644 --- a/src/SketchCanvas.js +++ b/src/SketchCanvas.js @@ -9,9 +9,9 @@ import ReactNative, { PanResponder, PixelRatio, Platform, - ViewPropTypes, processColor } from 'react-native' +import {ViewPropTypes} from 'deprecated-react-native-prop-types' import { requestPermissions } from './handlePermissions'; const RNSketchCanvas = requireNativeComponent('RNSketchCanvas', SketchCanvas, {