mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9d132339f7
Summary: I removed var in ReactAndroid/src/androidTest. - [x] npm run prettier - [x] npm run flow-check-ios - [x] npm run flow-check-android [GENERAL] [ReactAndroid/src/androidTest] - remove var Pull Request resolved: https://github.com/facebook/react-native/pull/22135 Differential Revision: D12921224 Pulled By: TheSavior fbshipit-source-id: 9a14755944df642f8b82c46c691d6ed6ee8fa623
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const BatchedBridge = require('BatchedBridge');
|
|
const TimePickerAndroid = require('TimePickerAndroid');
|
|
const React = require('React');
|
|
const RecordingModule = require('NativeModules')
|
|
.TimePickerDialogRecordingModule;
|
|
const View = require('View');
|
|
|
|
class TimePickerDialogTestApp extends React.Component {
|
|
render() {
|
|
return <View />;
|
|
}
|
|
}
|
|
|
|
const TimePickerDialogTestModule = {
|
|
TimePickerDialogTestApp: TimePickerDialogTestApp,
|
|
showTimePickerDialog: function(options) {
|
|
TimePickerAndroid.open(options).then(
|
|
({action, hour, minute}) => {
|
|
if (action === TimePickerAndroid.timeSetAction) {
|
|
RecordingModule.recordTime(hour, minute);
|
|
} else if (action === TimePickerAndroid.dismissedAction) {
|
|
RecordingModule.recordDismissed();
|
|
}
|
|
},
|
|
({code, message}) => RecordingModule.recordError(),
|
|
);
|
|
},
|
|
};
|
|
|
|
BatchedBridge.registerCallableModule(
|
|
'TimePickerDialogTestModule',
|
|
TimePickerDialogTestModule,
|
|
);
|
|
|
|
module.exports = TimePickerDialogTestModule;
|