Permalink
Browse files

Flowtype Switch

Reviewed By: yungsters

Differential Revision: D7985880

fbshipit-source-id: eaaff2188b8257d09e1bf628d19dae6dfb4c2fc6
  • Loading branch information...
TheSavior authored and facebook-github-bot committed May 14, 2018
1 parent cbe045a commit 06052a2330fc9c1dd0d56c6bbe5a17703f80c6b9
Showing with 17 additions and 3 deletions.
  1. +17 −3 Libraries/Components/Switch/Switch.js
@@ -14,18 +14,32 @@ const ColorPropType = require('ColorPropType');
const NativeMethodsMixin = require('NativeMethodsMixin');
const Platform = require('Platform');
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');
type DefaultProps = {
import type {ColorValue} from 'StyleSheetTypes';
import type {ViewProps} from 'ViewPropTypes';
type DefaultProps = $ReadOnly<{|
value: boolean,
disabled: boolean,
};
|}>;
type Props = $ReadOnly<{|
...ViewProps,
value?: ?boolean,
disabled?: ?boolean,
onValueChange?: ?Function,
testID?: ?string,
tintColor?: ?ColorValue,
onTintColor?: ?ColorValue,
thumbTintColor?: ?ColorValue,
|}>;
/**
* Renders a boolean input.
*
@@ -161,4 +175,4 @@ if (Platform.OS === 'android') {
});
}
module.exports = Switch;
module.exports = ((Switch: any): Class<ReactNative.NativeComponent<Props>>);

0 comments on commit 06052a2

Please sign in to comment.