mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 22:58:19 +00:00
Flowtype SegmentedControlIOS
Reviewed By: yungsters Differential Revision: D7985978 fbshipit-source-id: 6579ad8dd5c5377571fd790149ea5cfc6b33939f
This commit is contained in:
parent
c87701ba05
commit
113f009698
@ -12,6 +12,7 @@
|
||||
|
||||
const NativeMethodsMixin = require('NativeMethodsMixin');
|
||||
const React = require('React');
|
||||
const ReactNative = require('ReactNative');
|
||||
const PropTypes = require('prop-types');
|
||||
const StyleSheet = require('StyleSheet');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
@ -19,11 +20,24 @@ const ViewPropTypes = require('ViewPropTypes');
|
||||
const createReactClass = require('create-react-class');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
import type {ViewProps} from 'ViewPropTypes';
|
||||
|
||||
type DefaultProps = {
|
||||
values: Array<string>,
|
||||
values: $ReadOnlyArray<string>,
|
||||
enabled: boolean,
|
||||
};
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
...ViewProps,
|
||||
values?: ?$ReadOnlyArray<string>,
|
||||
selectedIndex?: ?number,
|
||||
onValueChange?: ?Function,
|
||||
onChange?: ?Function,
|
||||
enabled?: ?boolean,
|
||||
tintColor?: ?string,
|
||||
momentary?: ?boolean,
|
||||
|}>;
|
||||
|
||||
const SEGMENTED_CONTROL_REFERENCE = 'segmentedcontrol';
|
||||
|
||||
type Event = Object;
|
||||
@ -130,4 +144,6 @@ const RCTSegmentedControl = requireNativeComponent(
|
||||
SegmentedControlIOS,
|
||||
);
|
||||
|
||||
module.exports = SegmentedControlIOS;
|
||||
module.exports = ((SegmentedControlIOS: any): Class<
|
||||
ReactNative.NativeComponent<Props>,
|
||||
>);
|
||||
|
Loading…
x
Reference in New Issue
Block a user