2015-02-20 04:10:52 +00:00
|
|
|
/**
|
2015-03-23 20:35:08 +00:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
2015-02-20 04:10:52 +00:00
|
|
|
*
|
2015-05-08 16:45:43 +00:00
|
|
|
* @providesModule ReactNativeStyleAttributes
|
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
|
|
|
|
2015-04-17 01:17:19 +00:00
|
|
|
var ImageStylePropTypes = require('ImageStylePropTypes');
|
2015-02-20 04:10:52 +00:00
|
|
|
var TextStylePropTypes = require('TextStylePropTypes');
|
|
|
|
var ViewStylePropTypes = require('ViewStylePropTypes');
|
|
|
|
|
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. */
|
2016-03-02 12:27:13 +00:00
|
|
|
var keyMirror = require('fbjs/lib/keyMirror');
|
2015-09-17 15:36:08 +00:00
|
|
|
var processColor = require('processColor');
|
2015-10-06 22:19:59 +00:00
|
|
|
var processTransform = require('processTransform');
|
2015-04-17 01:17:19 +00:00
|
|
|
var sizesDiffer = require('sizesDiffer');
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2015-05-08 16:45:43 +00:00
|
|
|
var ReactNativeStyleAttributes = {
|
2015-04-17 01:17:19 +00:00
|
|
|
...keyMirror(ViewStylePropTypes),
|
|
|
|
...keyMirror(TextStylePropTypes),
|
|
|
|
...keyMirror(ImageStylePropTypes),
|
|
|
|
};
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2015-10-06 22:19:59 +00:00
|
|
|
ReactNativeStyleAttributes.transform = { process: processTransform };
|
2015-05-08 16:45:43 +00:00
|
|
|
ReactNativeStyleAttributes.shadowOffset = { diff: sizesDiffer };
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2015-09-17 15:36:08 +00:00
|
|
|
var colorAttributes = { process: processColor };
|
|
|
|
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;
|