mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 15:18:10 +00:00
Summary: Related to #21342 * Renamed ViewStyleProps to DeprecatedViewStyleProps. * Moved propType declaration to `react-native/Libraries/DeprecatedPropTypes` * ImageProps.js: moved propType declarations to DeprecatedImageProps.js. Pull Request resolved: https://github.com/facebook/react-native/pull/21415 Reviewed By: TheSavior Differential Revision: D10119599 Pulled By: RSNara fbshipit-source-id: 67674039a88dcd570973c7062f86ebdbd6987d28
51 lines
1.9 KiB
JavaScript
51 lines
1.9 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format strict-local
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const DeprecatedImageStylePropTypes = require('DeprecatedImageStylePropTypes');
|
|
const TextStylePropTypes = require('TextStylePropTypes');
|
|
const DeprecatedViewStylePropTypes = require('DeprecatedViewStylePropTypes');
|
|
|
|
const processColor = require('processColor');
|
|
const processTransform = require('processTransform');
|
|
const sizesDiffer = require('sizesDiffer');
|
|
|
|
const ReactNativeStyleAttributes = {};
|
|
|
|
for (const attributeName of Object.keys({
|
|
...DeprecatedViewStylePropTypes,
|
|
...TextStylePropTypes,
|
|
...DeprecatedImageStylePropTypes,
|
|
})) {
|
|
ReactNativeStyleAttributes[attributeName] = true;
|
|
}
|
|
|
|
ReactNativeStyleAttributes.transform = {process: processTransform};
|
|
ReactNativeStyleAttributes.shadowOffset = {diff: sizesDiffer};
|
|
|
|
const colorAttributes = {process: processColor};
|
|
ReactNativeStyleAttributes.backgroundColor = colorAttributes;
|
|
ReactNativeStyleAttributes.borderBottomColor = colorAttributes;
|
|
ReactNativeStyleAttributes.borderColor = colorAttributes;
|
|
ReactNativeStyleAttributes.borderLeftColor = colorAttributes;
|
|
ReactNativeStyleAttributes.borderRightColor = colorAttributes;
|
|
ReactNativeStyleAttributes.borderTopColor = colorAttributes;
|
|
ReactNativeStyleAttributes.borderStartColor = colorAttributes;
|
|
ReactNativeStyleAttributes.borderEndColor = colorAttributes;
|
|
ReactNativeStyleAttributes.color = colorAttributes;
|
|
ReactNativeStyleAttributes.shadowColor = colorAttributes;
|
|
ReactNativeStyleAttributes.textDecorationColor = colorAttributes;
|
|
ReactNativeStyleAttributes.tintColor = colorAttributes;
|
|
ReactNativeStyleAttributes.textShadowColor = colorAttributes;
|
|
ReactNativeStyleAttributes.overlayColor = colorAttributes;
|
|
|
|
module.exports = ReactNativeStyleAttributes;
|