Permalink
Browse files

Flowtype Slider

Reviewed By: yungsters

Differential Revision: D7985857

fbshipit-source-id: 8b6b9f58aa89b898fa38d1cfc0564df5f64741a2
  • Loading branch information...
TheSavior authored and facebook-github-bot committed May 14, 2018
1 parent 891dfc3 commit cbe045a95f1ca53d99ae521742a93299a53d6136
Showing with 35 additions and 1 deletion.
  1. +35 −1 Libraries/Components/Slider/Slider.js
@@ -13,6 +13,7 @@
const Image = require('Image');
const ColorPropType = require('ColorPropType');
const NativeMethodsMixin = require('NativeMethodsMixin');
const ReactNative = require('ReactNative');
const ReactNativeViewAttributes = require('ReactNativeViewAttributes');
const Platform = require('Platform');
const React = require('React');
@@ -23,8 +24,41 @@ const ViewPropTypes = require('ViewPropTypes');
const createReactClass = require('create-react-class');
const requireNativeComponent = require('requireNativeComponent');
import type {ImageSource} from 'ImageSource';
import type {ViewStyleProp} from 'StyleSheet';
import type {ColorValue} from 'StyleSheetTypes';
import type {ViewProps} from 'ViewPropTypes';
type Event = Object;
type IOSProps = $ReadOnly<{|
trackImage?: ?ImageSource,
minimumTrackImage?: ?ImageSource,
maximumTrackImage?: ?ImageSource,
thumbImage?: ?ImageSource,
|}>;
type AndroidProps = $ReadOnly<{|
thumbTintColor?: ?ColorValue,
|}>;
type Props = $ReadOnly<{|
...ViewProps,
...IOSProps,
...AndroidProps,
style?: ?ViewStyleProp,
value?: ?number,
step?: ?number,
minimumValue?: ?number,
maximumValue?: ?number,
minimumTrackTintColor?: ?ColorValue,
maximumTrackTintColor?: ?ColorValue,
disabled?: ?boolean,
onValueChange?: ?Function,
onSlidingComplete?: ?Function,
testID?: ?string,
|}>;
/**
* A component used to select a single value from a range of values.
*
@@ -282,4 +316,4 @@ if (Platform.OS === 'android') {
}
const RCTSlider = requireNativeComponent('RCTSlider', Slider, options);
module.exports = Slider;
module.exports = ((Slider: any): Class<ReactNative.NativeComponent<Props>>);

0 comments on commit cbe045a

Please sign in to comment.