mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
886fb501bd
Summary: This diff updated the format of generated view configs so that they don't need to spread View props into every config, by adding a new registerGeneratedConfig function which will spread them instead This is a bit of a cleanup of the generated output but is primarily so that the view config babel plugin will not need to rely on object spreading or object.assigns Reviewed By: TheSavior, cpojer Differential Revision: D15517199 fbshipit-source-id: 08e575578177bad12d40ee3dcad9381974b6466d
39 lines
904 B
JavaScript
39 lines
904 B
JavaScript
|
|
/**
|
|
* 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.
|
|
*
|
|
* @flow
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const registerGeneratedViewConfig = require('../../Utilities/registerGeneratedViewConfig');
|
|
|
|
const PullToRefreshViewViewConfig = {
|
|
uiViewClassName: 'PullToRefreshView',
|
|
|
|
bubblingEventTypes: {
|
|
topRefresh: {
|
|
phasedRegistrationNames: {
|
|
captured: 'onRefreshCapture',
|
|
bubbled: 'onRefresh',
|
|
},
|
|
},
|
|
},
|
|
|
|
validAttributes: {
|
|
tintColor: { process: require('../../StyleSheet/processColor') },
|
|
titleColor: { process: require('../../StyleSheet/processColor') },
|
|
title: true,
|
|
refreshing: true,
|
|
onRefresh: true,
|
|
},
|
|
};
|
|
|
|
registerGeneratedViewConfig('PullToRefreshView', PullToRefreshViewViewConfig);
|
|
|
|
module.exports = 'PullToRefreshView';
|