mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Move and Rename custom propType definitions in ColorPropTypes (#21371)
Summary: related #21342 TODO * move ColorPropType.js * fix flow error CheckList - [x] `yarn prettier` - [x] `yarn flow-check-android` - [x] `yarn flow-check-ios` All flow checks pass. [GENERAL] [ENHANCEMENT] [DeprecatedColorPropType.js] - Created. Pull Request resolved: https://github.com/facebook/react-native/pull/21371 Reviewed By: RSNara Differential Revision: D10087818 Pulled By: TheSavior fbshipit-source-id: 48088b441699886eef1fff3aafc2ca6015455006
This commit is contained in:
committed by
Facebook Github Bot
parent
00b1f93fae
commit
c18458b394
@@ -10,7 +10,6 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const Platform = require('Platform');
|
||||
const React = require('React');
|
||||
const StyleSheet = require('StyleSheet');
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
||||
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
|
||||
const NativeMethodsMixin = require('NativeMethodsMixin');
|
||||
const Platform = require('Platform');
|
||||
@@ -92,7 +92,7 @@ const DrawerLayoutAndroid = createReactClass({
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
drawerBackgroundColor: ColorPropType,
|
||||
drawerBackgroundColor: DeprecatedColorPropType,
|
||||
/**
|
||||
* Specifies the side of the screen from which the drawer will slide in.
|
||||
*/
|
||||
@@ -147,7 +147,7 @@ const DrawerLayoutAndroid = createReactClass({
|
||||
* status bar to allow it to open over the status bar. It will only have an
|
||||
* effect on API 21+.
|
||||
*/
|
||||
statusBarBackgroundColor: ColorPropType,
|
||||
statusBarBackgroundColor: DeprecatedColorPropType,
|
||||
},
|
||||
|
||||
mixins: [NativeMethodsMixin],
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
||||
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
|
||||
const Platform = require('Platform');
|
||||
const React = require('React');
|
||||
@@ -85,7 +85,7 @@ type Props = {
|
||||
*/
|
||||
nativeID?: string,
|
||||
style?: DeprecatedViewPropTypes.style,
|
||||
backgroundColor?: ColorPropType,
|
||||
backgroundColor?: DeprecatedColorPropType,
|
||||
};
|
||||
|
||||
class InputAccessoryView extends React.Component<Props> {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
||||
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
|
||||
const DocumentSelectionState = require('DocumentSelectionState');
|
||||
const EventEmitter = require('EventEmitter');
|
||||
@@ -592,7 +592,7 @@ const TextInput = createReactClass({
|
||||
/**
|
||||
* The text color of the placeholder string.
|
||||
*/
|
||||
placeholderTextColor: ColorPropType,
|
||||
placeholderTextColor: DeprecatedColorPropType,
|
||||
/**
|
||||
* If `false`, scrolling of the text view will be disabled.
|
||||
* The default value is `true`. Does only work with 'multiline={true}'.
|
||||
@@ -607,7 +607,7 @@ const TextInput = createReactClass({
|
||||
/**
|
||||
* The highlight and cursor color of the text input.
|
||||
*/
|
||||
selectionColor: ColorPropType,
|
||||
selectionColor: DeprecatedColorPropType,
|
||||
/**
|
||||
* An instance of `DocumentSelectionState`, this is some state that is responsible for
|
||||
* maintaining selection information for a document.
|
||||
@@ -698,7 +698,7 @@ const TextInput = createReactClass({
|
||||
* The color of the `TextInput` underline.
|
||||
* @platform android
|
||||
*/
|
||||
underlineColorAndroid: ColorPropType,
|
||||
underlineColorAndroid: DeprecatedColorPropType,
|
||||
|
||||
/**
|
||||
* If defined, the provided image resource will be rendered on the left.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
||||
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
|
||||
const Image = require('Image');
|
||||
const NativeMethodsMixin = require('NativeMethodsMixin');
|
||||
@@ -118,7 +118,7 @@ const ToolbarAndroid = createReactClass({
|
||||
/**
|
||||
* Sets the toolbar subtitle color.
|
||||
*/
|
||||
subtitleColor: ColorPropType,
|
||||
subtitleColor: DeprecatedColorPropType,
|
||||
/**
|
||||
* Sets the toolbar title.
|
||||
*/
|
||||
@@ -126,7 +126,7 @@ const ToolbarAndroid = createReactClass({
|
||||
/**
|
||||
* Sets the toolbar title color.
|
||||
*/
|
||||
titleColor: ColorPropType,
|
||||
titleColor: DeprecatedColorPropType,
|
||||
/**
|
||||
* Sets the content inset for the toolbar starting edge.
|
||||
*
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
||||
const DeprecatedViewPropTypes = require('DeprecatedViewPropTypes');
|
||||
const NativeMethodsMixin = require('NativeMethodsMixin');
|
||||
const Platform = require('Platform');
|
||||
@@ -164,7 +164,7 @@ const TouchableHighlight = ((createReactClass({
|
||||
* The color of the underlay that will show through when the touch is
|
||||
* active.
|
||||
*/
|
||||
underlayColor: ColorPropType,
|
||||
underlayColor: DeprecatedColorPropType,
|
||||
/**
|
||||
* Style to apply to the container/underlay. Most commonly used to make sure
|
||||
* rounded corners match the wrapped component.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
||||
const ReactPropTypes = require('prop-types');
|
||||
|
||||
/**
|
||||
@@ -26,7 +26,7 @@ const ShadowPropTypesIOS = {
|
||||
* Sets the drop shadow color
|
||||
* @platform ios
|
||||
*/
|
||||
shadowColor: ColorPropType,
|
||||
shadowColor: DeprecatedColorPropType,
|
||||
/**
|
||||
* Sets the drop shadow offset
|
||||
* @platform ios
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const ColorPropType = require('ColorPropType');
|
||||
const DeprecatedColorPropType = require('DeprecatedColorPropType');
|
||||
const LayoutPropTypes = require('LayoutPropTypes');
|
||||
const ReactPropTypes = require('prop-types');
|
||||
const ShadowPropTypesIOS = require('ShadowPropTypesIOS');
|
||||
@@ -24,14 +24,14 @@ const ViewStylePropTypes = {
|
||||
...ShadowPropTypesIOS,
|
||||
...DeprecatedTransformPropTypes,
|
||||
backfaceVisibility: ReactPropTypes.oneOf(['visible', 'hidden']),
|
||||
backgroundColor: ColorPropType,
|
||||
borderColor: ColorPropType,
|
||||
borderTopColor: ColorPropType,
|
||||
borderRightColor: ColorPropType,
|
||||
borderBottomColor: ColorPropType,
|
||||
borderLeftColor: ColorPropType,
|
||||
borderStartColor: ColorPropType,
|
||||
borderEndColor: ColorPropType,
|
||||
backgroundColor: DeprecatedColorPropType,
|
||||
borderColor: DeprecatedColorPropType,
|
||||
borderTopColor: DeprecatedColorPropType,
|
||||
borderRightColor: DeprecatedColorPropType,
|
||||
borderBottomColor: DeprecatedColorPropType,
|
||||
borderLeftColor: DeprecatedColorPropType,
|
||||
borderStartColor: DeprecatedColorPropType,
|
||||
borderEndColor: DeprecatedColorPropType,
|
||||
borderRadius: ReactPropTypes.number,
|
||||
borderTopLeftRadius: ReactPropTypes.number,
|
||||
borderTopRightRadius: ReactPropTypes.number,
|
||||
|
||||
Reference in New Issue
Block a user