2015-02-20 04:10:52 +00:00
|
|
|
/**
|
2015-03-23 20:35:08 +00:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00: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-20 04:10:52 +00:00
|
|
|
*
|
2018-05-11 02:06:46 +00:00
|
|
|
* @format
|
2015-03-25 01:33:05 +00:00
|
|
|
* @flow
|
2015-02-20 04:10:52 +00:00
|
|
|
*/
|
|
|
|
|
2015-04-17 01:17:19 +00:00
|
|
|
'use strict';
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2018-03-03 23:04:46 +00:00
|
|
|
const ImageStylePropTypes = require('ImageStylePropTypes');
|
|
|
|
const TextStylePropTypes = require('TextStylePropTypes');
|
|
|
|
const ViewStylePropTypes = require('ViewStylePropTypes');
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2017-09-06 10:25:01 +00: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 23:04:46 +00:00
|
|
|
const keyMirror = require('fbjs/lib/keyMirror');
|
|
|
|
const processColor = require('processColor');
|
|
|
|
const processTransform = require('processTransform');
|
|
|
|
const sizesDiffer = require('sizesDiffer');
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2018-03-03 23:04:46 +00:00
|
|
|
const ReactNativeStyleAttributes = {
|
2015-04-17 01:17:19 +00:00
|
|
|
...keyMirror(ViewStylePropTypes),
|
|
|
|
...keyMirror(TextStylePropTypes),
|
|
|
|
...keyMirror(ImageStylePropTypes),
|
|
|
|
};
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2018-05-11 02:06:46 +00:00
|
|
|
ReactNativeStyleAttributes.transform = {process: processTransform};
|
|
|
|
ReactNativeStyleAttributes.shadowOffset = {diff: sizesDiffer};
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2018-05-11 02:06:46 +00:00
|
|
|
const colorAttributes = {process: processColor};
|
2015-09-17 15:36:08 +00:00
|
|
|
ReactNativeStyleAttributes.backgroundColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderBottomColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderLeftColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderRightColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderTopColor = colorAttributes;
|
2017-10-19 02:29:42 +00:00
|
|
|
ReactNativeStyleAttributes.borderStartColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.borderEndColor = colorAttributes;
|
2015-09-17 15:36:08 +00:00
|
|
|
ReactNativeStyleAttributes.color = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.shadowColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.textDecorationColor = colorAttributes;
|
|
|
|
ReactNativeStyleAttributes.tintColor = colorAttributes;
|
2016-01-01 17:32:59 +00:00
|
|
|
ReactNativeStyleAttributes.textShadowColor = colorAttributes;
|
2016-01-24 21:59:36 +00:00
|
|
|
ReactNativeStyleAttributes.overlayColor = colorAttributes;
|
2015-09-17 15:36:08 +00:00
|
|
|
|
2015-05-08 16:45:43 +00:00
|
|
|
module.exports = ReactNativeStyleAttributes;
|