mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Handwritten view configs for Image
Summary: Hand writing view configs for NativeImageViewComponent so that it'll work in bridgeless mode and won't fall back to the UIManager. Changelog: [Internal] Reviewed By: ejanzer Differential Revision: D19217961 fbshipit-source-id: d5a123b35a75ba3e22c57b1dde18a47893681614
This commit is contained in:
committed by
Facebook Github Bot
parent
233fdfc014
commit
80cfa9c8ee
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @flow strict-local
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import ReactNativeViewViewConfig from '../Components/View/ReactNativeViewViewConfig';
|
||||
import type {ReactNativeBaseComponentViewConfig} from '../Renderer/shims/ReactNativeTypes';
|
||||
|
||||
const ImageViewViewConfig = {
|
||||
uiViewClassName: 'RCTImageView',
|
||||
bubblingEventTypes: {},
|
||||
directEventTypes: {
|
||||
topLoadStart: {
|
||||
registrationName: 'onLoadStart',
|
||||
},
|
||||
topProgress: {
|
||||
registrationName: 'onProgress',
|
||||
},
|
||||
topError: {
|
||||
registrationName: 'onError',
|
||||
},
|
||||
topPartialLoad: {
|
||||
registrationName: 'onPartialLoad',
|
||||
},
|
||||
topLoad: {
|
||||
registrationName: 'onLoad',
|
||||
},
|
||||
topLoadEnd: {
|
||||
registrationName: 'onLoadEnd',
|
||||
},
|
||||
},
|
||||
validAttributes: {
|
||||
...ReactNativeViewViewConfig.validAttributes,
|
||||
blurRadius: true,
|
||||
capInsets: {diff: (require('../Utilities/differ/insetsDiffer'): any)}, // flowlint-line unclear-type:off
|
||||
defaultSource: {
|
||||
process: require('./resolveAssetSource'),
|
||||
},
|
||||
defaultSrc: true,
|
||||
fadeDuration: true,
|
||||
headers: true,
|
||||
loadingIndicatorSrc: true,
|
||||
onError: true,
|
||||
onLoad: true,
|
||||
onLoadEnd: true,
|
||||
onLoadStart: true,
|
||||
onPartialLoad: true,
|
||||
onProgress: true,
|
||||
overlayColor: {process: require('../StyleSheet/processColor')},
|
||||
progressiveRenderingEnabled: true,
|
||||
resizeMethod: true,
|
||||
resizeMode: true,
|
||||
shouldNotifyLoadEvents: true,
|
||||
source: true,
|
||||
src: true,
|
||||
tintColor: {process: require('../StyleSheet/processColor')},
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = (ImageViewViewConfig: ReactNativeBaseComponentViewConfig<>);
|
||||
Reference in New Issue
Block a user