mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 15:18:10 +00:00
Summary: Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change: Changelog: ---------- [iOS] [Changed] - As mentioned in #22990, I have moved native components required by DatePickerIOS.ios.js into separate files and added Flow Typing. Pull Request resolved: https://github.com/facebook/react-native/pull/23013 Differential Revision: D13697591 Pulled By: TheSavior fbshipit-source-id: 5aec5a2270cbfc708f3e3a67662abd8071f1333f
42 lines
1.0 KiB
JavaScript
42 lines
1.0 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
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const requireNativeComponent = require('requireNativeComponent');
|
|
|
|
import type {SyntheticEvent} from 'CoreEventTypes';
|
|
import type {ViewProps} from 'ViewPropTypes';
|
|
import type {NativeComponent} from 'ReactNative';
|
|
|
|
type Event = SyntheticEvent<
|
|
$ReadOnly<{|
|
|
timestamp: number,
|
|
|}>,
|
|
>;
|
|
|
|
type NativeProps = $ReadOnly<{|
|
|
...ViewProps,
|
|
date?: ?number,
|
|
initialDate?: ?Date,
|
|
locale?: ?string,
|
|
maximumDate?: ?number,
|
|
minimumDate?: ?number,
|
|
minuteInterval?: ?(1 | 2 | 3 | 4 | 5 | 6 | 10 | 12 | 15 | 20 | 30),
|
|
mode?: ?('date' | 'time' | 'datetime'),
|
|
onChange?: ?(event: Event) => void,
|
|
timeZoneOffsetInMinutes?: ?number,
|
|
|}>;
|
|
type RCTDatePickerNativeType = Class<NativeComponent<NativeProps>>;
|
|
|
|
module.exports = ((requireNativeComponent(
|
|
'RCTDatePicker',
|
|
): any): RCTDatePickerNativeType);
|