mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
18e6094cab
Summary: For some reason we're now spamming the logs everytime we render an Image because overflow is not defined in the whitelist. overflow: 'hidden' is needed for network images with cover mode. The way we currently define those is not optimal where we try to factor as many things as possible into distinct propTypes. However for Text we're not even using this but we are getting all the ones from View (which many do not apply) and remove some that aren't needed. It may be useful to cleanup this in the future but in the short term, it's better to remove this warning that doesn't have much value anyway.
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
/**
|
|
* 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.
|
|
*
|
|
* @providesModule ImageStylePropTypes
|
|
* @flow
|
|
*/
|
|
'use strict';
|
|
|
|
var ImageResizeMode = require('ImageResizeMode');
|
|
var LayoutPropTypes = require('LayoutPropTypes');
|
|
var ReactPropTypes = require('ReactPropTypes');
|
|
var TransformPropTypes = require('TransformPropTypes');
|
|
|
|
var ImageStylePropTypes = {
|
|
...LayoutPropTypes,
|
|
...TransformPropTypes,
|
|
resizeMode: ReactPropTypes.oneOf(Object.keys(ImageResizeMode)),
|
|
backgroundColor: ReactPropTypes.string,
|
|
borderColor: ReactPropTypes.string,
|
|
borderWidth: ReactPropTypes.number,
|
|
borderRadius: ReactPropTypes.number,
|
|
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
|
|
|
|
// iOS-Specific style to "tint" an image.
|
|
// It changes the color of all the non-transparent pixels to the tintColor
|
|
tintColor: ReactPropTypes.string,
|
|
opacity: ReactPropTypes.number,
|
|
};
|
|
|
|
module.exports = ImageStylePropTypes;
|