react-native-ui-lib
react-native-ui-lib copied to clipboard
Infra/color picker to reanimated
Description
ColorPicker Notes:
- ColorPickerDialog changed to use a SharedValue color and pass it to the ColorPickerContext.
- ColorPickerHeader changed to take validity from ColorPickerContext.
- ColorPickerSliders changed to use initialColor as the color from the ColorPickerContext - NEED TO SOMEHOW USE THE STATEFUL COLOR SO IT WOULD CHANGE THE INITIAL VALUE OF THE SLIDERS LOCATION.
- ColorPickerPresenter - Added worklet functions.
- ColorPickerPreview - Added conditional rendering of the TextInput so it would be reactive when the users wants to change the value manually.
- AnimatedGradient - A gradient component that its color is a sharedvalue.
- GradientSlider - change to conditionally render an animated gradient if is in the context of the colorpicker - MIGHT WANT TO CHANGE THAT IT WOULD ACCEPT A SHAREDVALUE COLOR WITHOUT THE CONTEXT OF THE CONTEXT.
- Slider - Added prop to know if the handlers are worklet function so it wont have to run them on the JS thread.
// TODO:
- When changing the color manually from the textinput the hue slider doesn't change - bug comes from hslToHex function.
- Make sliders change the initial value thumb location when the color is change manually.
Changelog
None
Additional info
None