instea / react-native-color-picker

Color picker component for IOS/Android
Apache License 2.0
272 stars 65 forks source link

Fixed the issue for future release of React Native (removal of Slider extracted from react-native) #50

Open Hassan-Naeem-code opened 1 year ago

Hassan-Naeem-code commented 1 year ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native-color-picker@0.6.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-color-picker/src/HoloColorPicker.tsx b/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
index 51a7bcc..6707587 100644
--- a/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
+++ b/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
@@ -4,13 +4,12 @@ import {
   Image,
   InteractionManager,
   PanResponderInstance,
-  Slider,
   StyleSheet,
   TouchableOpacity,
   View,
 } from "react-native"
 import tinycolor from "tinycolor2"
-
+import Slider from '@react-native-community/slider';
 import { HsvColor, IPickerProps, Point2D } from "./typeHelpers"
 import { createPanResponder } from "./utils"

This issue body was partially generated by patch-package.