Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Flowtype SegmentedControlIOS
Reviewed By: yungsters

Differential Revision: D7985978

fbshipit-source-id: 6579ad8dd5c5377571fd790149ea5cfc6b33939f
  • Loading branch information
TheSavior authored and facebook-github-bot committed May 14, 2018
1 parent c87701b commit 113f009
Showing 1 changed file with 18 additions and 2 deletions.
Expand Up @@ -12,18 +12,32 @@

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');

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;
Expand Down Expand Up @@ -130,4 +144,6 @@ const RCTSegmentedControl = requireNativeComponent(
SegmentedControlIOS,
);

module.exports = SegmentedControlIOS;
module.exports = ((SegmentedControlIOS: any): Class<
ReactNative.NativeComponent<Props>,
>);

0 comments on commit 113f009

Please sign in to comment.