Files
react-native/Libraries/Components/RefreshControl/PullToRefreshViewNativeViewConfig.js
T
Rick Hanlon 886fb501bd RN Codegen] Add registerGeneratedViewConfig
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
2019-06-07 12:31:35 -07:00

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';