2015-02-19 20:10:52 -08:00
|
|
|
/**
|
2015-03-23 13:35:08 -07:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-16 18:24:55 -08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2015-02-19 20:10:52 -08:00
|
|
|
*
|
2018-05-10 19:06:46 -07:00
|
|
|
* @format
|
2015-03-24 18:33:05 -07:00
|
|
|
* @flow
|
2015-02-19 20:10:52 -08:00
|
|
|
*/
|
|
|
|
|
2015-04-16 18:17:19 -07:00
|
|
|
'use strict';
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2018-03-03 15:04:46 -08:00
|
|
|
const ImageStylePropTypes = require('ImageStylePropTypes');
|
|
|
|
const TextStylePropTypes = require('TextStylePropTypes');
|
|
|
|
const ViewStylePropTypes = require('ViewStylePropTypes');
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2017-09-06 03:25:01 -07:00
|
|
|
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
|
|
|
|
* found when Flow v0.54 was deployed. To see the error delete this comment and
|
|
|
|
* run Flow. */
|
2018-03-03 15:04:46 -08:00
|
|
|
const keyMirror = require('fbjs/lib/keyMirror');
|
|
|
|
const processColor = require('processColor');
|
|
|
|
const processTransform = require('processTransform');
|
|
|
|
const sizesDiffer = require('sizesDiffer');
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2018-03-03 15:04:46 -08:00
|
|
|
const ReactNativeStyleAttributes = {
|
2015-04-16 18:17:19 -07:00
|
|
|
...keyMirror(ViewStylePropTypes),
|
|
|
|
...keyMirror(TextStylePropTypes),
|
|
|
|
...keyMirror(ImageStylePropTypes),
|
|
|
|
};
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2018-05-10 19:06:46 -07:00
|
|
|
ReactNativeStyleAttributes.transform = {process: processTransform};
|
|
|
|
ReactNativeStyleAttributes.shadowOffset = {diff: sizesDiffer};
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2018-05-10 19:06:46 -07:00
|
|
|
const colorAttributes = {process: processColor};
|
2015-09-17 08:36:08 -07:00
|
|
|
ReactNativeStyleAttributes.backgroundColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderBottomColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderLeftColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderRightColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderTopColor = colorAttributes;
|
2017-10-18 19:29:42 -07:00
|
|
|
ReactNativeStyleAttributes.borderStartColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderEndColor = colorAttributes;
|
2015-09-17 08:36:08 -07:00
|
|
|
ReactNativeStyleAttributes.color = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.shadowColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.textDecorationColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.tintColor = colorAttributes;
|
2016-01-01 09:32:59 -08:00
|
|
|
ReactNativeStyleAttributes.textShadowColor = colorAttributes;
|
2016-01-24 13:59:36 -08:00
|
|
|
ReactNativeStyleAttributes.overlayColor = colorAttributes;
|
2015-09-17 08:36:08 -07:00
|
|
|
|
2015-05-08 09:45:43 -07:00
|
|
|
module.exports = ReactNativeStyleAttributes;
|