wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.46k stars 707 forks source link

Infra/picker new picker type prop #3122

Closed adids1221 closed 1 month ago

adids1221 commented 3 months ago

Description

New Picker prop pickerType to choose the "render" mode of the picker - 'modal, dialog, wheelPicker, custom" and according to that to pass the right type of header props. Default value 'Modal'. Deprecation of useDialog, useWheelPicker, pickerModalProps, topBarProps, renderCustomModal.

Note: I moved the Picker prop that are deprecated to PickerDeprecationsProps type so in v8 removing the props from PickerBaseProps will be much easier.

Testing PR

Changelog

New Picker prop pickerType and 'headerProps' props to choose the "render" mode of the picker.

Additional info

MADS-4187

Inbal-Tish commented 3 months ago

@adids1221 I notice a couple of bugs with pickerType="dialog": 1) If you're not passing anything but the picker type the dialog is cut at the bottom (I'll send you a screenshot). 2) if you only pass 'headerProps' - the dialog is not rendering at all, only the overlay