diff --git a/Libraries/Animated/src/createAnimatedComponent.js b/Libraries/Animated/src/createAnimatedComponent.js index fb66023217f2bf..d705d6eebaa8be 100644 --- a/Libraries/Animated/src/createAnimatedComponent.js +++ b/Libraries/Animated/src/createAnimatedComponent.js @@ -12,7 +12,7 @@ const {AnimatedEvent} = require('./AnimatedEvent'); const AnimatedProps = require('./nodes/AnimatedProps'); const React = require('React'); -const ViewStylePropTypes = require('ViewStylePropTypes'); +const DeprecatedViewStylePropTypes = require('DeprecatedViewStylePropTypes'); const invariant = require('fbjs/lib/invariant'); @@ -184,7 +184,7 @@ function createAnimatedComponent(Component: any): any { return; } - for (const key in ViewStylePropTypes) { + for (const key in DeprecatedViewStylePropTypes) { if (!propTypes[key] && props[key] !== undefined) { console.warn( 'You are setting the style `{ ' + diff --git a/Libraries/Components/Slider/Slider.js b/Libraries/Components/Slider/Slider.js index 7b7cfb3e71d739..fdde5f17ea6eec 100644 --- a/Libraries/Components/Slider/Slider.js +++ b/Libraries/Components/Slider/Slider.js @@ -66,7 +66,7 @@ type Props = $ReadOnly<{| /** * Used to style and layout the `Slider`. See `StyleSheet.js` and - * `ViewStylePropTypes.js` for more info. + * `DeprecatedViewStylePropTypes.js` for more info. */ style?: ?ViewStyleProp, diff --git a/Libraries/Components/View/ReactNativeStyleAttributes.js b/Libraries/Components/View/ReactNativeStyleAttributes.js index 7593a4e0b678c4..240e6a4f0a4e4a 100644 --- a/Libraries/Components/View/ReactNativeStyleAttributes.js +++ b/Libraries/Components/View/ReactNativeStyleAttributes.js @@ -12,7 +12,7 @@ const DeprecatedImageStylePropTypes = require('DeprecatedImageStylePropTypes'); const TextStylePropTypes = require('TextStylePropTypes'); -const ViewStylePropTypes = require('ViewStylePropTypes'); +const DeprecatedViewStylePropTypes = require('DeprecatedViewStylePropTypes'); const processColor = require('processColor'); const processTransform = require('processTransform'); @@ -21,7 +21,7 @@ const sizesDiffer = require('sizesDiffer'); const ReactNativeStyleAttributes = {}; for (const attributeName of Object.keys({ - ...ViewStylePropTypes, + ...DeprecatedViewStylePropTypes, ...TextStylePropTypes, ...DeprecatedImageStylePropTypes, })) { diff --git a/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js b/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js index 9bbb30c3ffdbc8..07dd0f91fc2b97 100644 --- a/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js +++ b/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js @@ -14,7 +14,7 @@ const DeprecatedEdgeInsetsPropType = require('DeprecatedEdgeInsetsPropType'); const PlatformViewPropTypes = require('PlatformViewPropTypes'); const PropTypes = require('prop-types'); const DeprecatedStyleSheetPropType = require('DeprecatedStyleSheetPropType'); -const ViewStylePropTypes = require('ViewStylePropTypes'); +const DeprecatedViewStylePropTypes = require('DeprecatedViewStylePropTypes'); const { AccessibilityComponentTypes, @@ -23,7 +23,9 @@ const { AccessibilityStates, } = require('ViewAccessibility'); -const stylePropType = DeprecatedStyleSheetPropType(ViewStylePropTypes); +const stylePropType = DeprecatedStyleSheetPropType( + DeprecatedViewStylePropTypes, +); module.exports = { /** diff --git a/Libraries/Components/View/ViewStylePropTypes.js b/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js similarity index 96% rename from Libraries/Components/View/ViewStylePropTypes.js rename to Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js index 486d7426e582c4..5b3b0b40538099 100644 --- a/Libraries/Components/View/ViewStylePropTypes.js +++ b/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js @@ -19,7 +19,7 @@ const DeprecatedTransformPropTypes = require('DeprecatedTransformPropTypes'); /** * Warning: Some of these properties may not be supported in all releases. */ -const ViewStylePropTypes = { +const DeprecatedViewStylePropTypes = { ...LayoutPropTypes, ...DeprecatedShadowPropTypesIOS, ...DeprecatedTransformPropTypes, @@ -58,4 +58,4 @@ const ViewStylePropTypes = { elevation: ReactPropTypes.number, }; -module.exports = ViewStylePropTypes; +module.exports = DeprecatedViewStylePropTypes; diff --git a/Libraries/StyleSheet/StyleSheetValidation.js b/Libraries/StyleSheet/StyleSheetValidation.js index 9fb5bb661ee5f5..5ff8a5c8408ee8 100644 --- a/Libraries/StyleSheet/StyleSheetValidation.js +++ b/Libraries/StyleSheet/StyleSheetValidation.js @@ -12,7 +12,7 @@ const DeprecatedImageStylePropTypes = require('DeprecatedImageStylePropTypes'); const TextStylePropTypes = require('TextStylePropTypes'); -const ViewStylePropTypes = require('ViewStylePropTypes'); +const DeprecatedViewStylePropTypes = require('DeprecatedViewStylePropTypes'); const invariant = require('fbjs/lib/invariant'); @@ -87,7 +87,7 @@ const allStylePropTypes = {}; if (__DEV__ && !global.__RCTProfileIsProfiling) { StyleSheetValidation.addValidStylePropTypes(DeprecatedImageStylePropTypes); StyleSheetValidation.addValidStylePropTypes(TextStylePropTypes); - StyleSheetValidation.addValidStylePropTypes(ViewStylePropTypes); + StyleSheetValidation.addValidStylePropTypes(DeprecatedViewStylePropTypes); } module.exports = StyleSheetValidation; diff --git a/Libraries/Text/TextStylePropTypes.js b/Libraries/Text/TextStylePropTypes.js index 5a53334f764cfb..d4755ef762c1dc 100644 --- a/Libraries/Text/TextStylePropTypes.js +++ b/Libraries/Text/TextStylePropTypes.js @@ -12,10 +12,10 @@ const DeprecatedColorPropType = require('DeprecatedColorPropType'); const ReactPropTypes = require('prop-types'); -const ViewStylePropTypes = require('ViewStylePropTypes'); +const DeprecatedViewStylePropTypes = require('DeprecatedViewStylePropTypes'); const TextStylePropTypes = { - ...ViewStylePropTypes, + ...DeprecatedViewStylePropTypes, color: DeprecatedColorPropType, fontFamily: ReactPropTypes.string,