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
|
|
|
*
|
|
|
|
* @providesModule ImageStylePropTypes
|
2015-03-26 17:06:50 +00:00
|
|
|
* @flow
|
2015-02-20 04:10:52 +00:00
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var ImageResizeMode = require('ImageResizeMode');
|
|
|
|
var LayoutPropTypes = require('LayoutPropTypes');
|
|
|
|
var ReactPropTypes = require('ReactPropTypes');
|
2015-12-23 03:29:01 +00:00
|
|
|
var ColorPropType = require('ColorPropType');
|
2015-05-06 21:28:05 +00:00
|
|
|
var TransformPropTypes = require('TransformPropTypes');
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2015-03-20 23:41:31 +00:00
|
|
|
var ImageStylePropTypes = {
|
|
|
|
...LayoutPropTypes,
|
2015-05-06 21:28:05 +00:00
|
|
|
...TransformPropTypes,
|
2015-03-20 23:41:31 +00:00
|
|
|
resizeMode: ReactPropTypes.oneOf(Object.keys(ImageResizeMode)),
|
2015-12-15 02:56:32 +00:00
|
|
|
backfaceVisibility: ReactPropTypes.oneOf(['visible', 'hidden']),
|
2015-12-23 03:29:01 +00:00
|
|
|
backgroundColor: ColorPropType,
|
|
|
|
borderColor: ColorPropType,
|
2015-03-20 23:41:31 +00:00
|
|
|
borderWidth: ReactPropTypes.number,
|
|
|
|
borderRadius: ReactPropTypes.number,
|
2015-07-27 17:49:43 +00:00
|
|
|
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2015-03-20 23:41:31 +00:00
|
|
|
// iOS-Specific style to "tint" an image.
|
|
|
|
// It changes the color of all the non-transparent pixels to the tintColor
|
2015-12-23 03:29:01 +00:00
|
|
|
tintColor: ColorPropType,
|
2015-03-20 23:41:31 +00:00
|
|
|
opacity: ReactPropTypes.number,
|
|
|
|
};
|
2015-02-20 04:10:52 +00:00
|
|
|
|
|
|
|
module.exports = ImageStylePropTypes;
|