mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
add warnings for DatePickerIOS and DatePickerAndroid (#25374)
Summary: `DatePickerIOS` and `DatePickerAndroid` have been merged as part of Lean Core. See [repo](https://github.com/react-native-community/react-native-datetimepicker) ## Changelog [General] [Deprecate] - Warning for `DatePickerIOS` and `DatePickerAndroid` Pull Request resolved: https://github.com/facebook/react-native/pull/25374 Test Plan: Warning prints when user imports `DatePickerIOS` or `DatePickerAndroid` Differential Revision: D15983829 Pulled By: cpojer fbshipit-source-id: dfa35e204bb133a1b8de67c25abaa4338b956901
This commit is contained in:
committed by
Facebook Github Bot
parent
d847163755
commit
c749eaf401
@@ -44,6 +44,12 @@ module.exports = {
|
||||
return require('../Components/CheckBox/CheckBox');
|
||||
},
|
||||
get DatePickerIOS() {
|
||||
warnOnce(
|
||||
'DatePickerIOS-merged',
|
||||
'DatePickerIOS has been merged with DatePickerAndroid and will be removed in a future release. ' +
|
||||
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
|
||||
'See https://github.com/react-native-community/react-native-datetimepicker',
|
||||
);
|
||||
return require('../Components/DatePicker/DatePickerIOS');
|
||||
},
|
||||
get DrawerLayoutAndroid() {
|
||||
@@ -181,6 +187,12 @@ module.exports = {
|
||||
return require('../Components/Clipboard/Clipboard');
|
||||
},
|
||||
get DatePickerAndroid() {
|
||||
warnOnce(
|
||||
'DatePickerAndroid-merged',
|
||||
'DatePickerAndroid has been merged with DatePickerIOS and will be removed in a future release. ' +
|
||||
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
|
||||
'See https://github.com/react-native-community/react-native-datetimepicker',
|
||||
);
|
||||
return require('../Components/DatePickerAndroid/DatePickerAndroid');
|
||||
},
|
||||
get DeviceInfo() {
|
||||
|
||||
Reference in New Issue
Block a user