teslamotors / react-native-camera-kit

A high performance, easy to use, rock solid camera library for React Native apps.
MIT License
2.42k stars 577 forks source link

onFocus event OR allow child of camera #590

Open jkester1986 opened 9 months ago

jkester1986 commented 9 months ago

Is your feature request related to a problem? Please describe. We need to be able to display an opacity slider over the camera taker area in some scenarios, which is triggered by the user tapping on the camera area. This currently works with react-native-camera by having a child component that contains some onPress actions. However, react-native-camera-kit does not allow child components.

I attempted to have a sibling component that overlays the camera area, but if there's an onPress action in my custom component, it prevents tap-to-focus & zoom. I currently don't have a way to have the tap-to-show-my-slider behavior AND the tap-to-focus/zoom from your camera package together - I either get one or the other

Describe the solution you'd like Allow child components that will work in a way that will let us do what's described above (resulting in fewer code changes for us), OR an onFocus or onPress prop or similar that we can pass a function to, that will run when the user taps in the camera area

Describe alternatives you've considered only options I could think of are described in my solution proposal.

Additional context