mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
65b10b350e
Summary: Part of #24875 ## Changelog [General] [Added] - Add TurboModule spec for TimePickerAndroid Pull Request resolved: https://github.com/facebook/react-native/pull/24897 Reviewed By: fkgozali Differential Revision: D15424335 Pulled By: RSNara fbshipit-source-id: a846de9353af58ad7d5e09678dd810ac33532105
34 lines
721 B
JavaScript
34 lines
721 B
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.
|
|
*
|
|
* @flow
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {TurboModule} from 'RCTExport';
|
|
import * as TurboModuleRegistry from 'TurboModuleRegistry';
|
|
|
|
export type TimePickerOptions = {|
|
|
hour?: number,
|
|
minute?: number,
|
|
is24Hour?: boolean,
|
|
mode?: string,
|
|
|};
|
|
|
|
export type TimePickerResult = {|
|
|
action: string,
|
|
hour: number,
|
|
minute: number,
|
|
|};
|
|
|
|
export interface Spec extends TurboModule {
|
|
+open: (options: TimePickerOptions) => Promise<TimePickerResult>;
|
|
}
|
|
|
|
export default TurboModuleRegistry.get<Spec>('TimePickerAndroid');
|