Files
react-native/Libraries/Components/RefreshControl/PullToRefreshViewNativeViewConfig.js
T
Rick Hanlon 9f8305a837 Add view config for PullToRefresh
Summary:
Adds the generated view config for PullToRefresh

Note: we're not using this view config yet, the component is in the process of being renamed (see TODO)

Reviewed By: rubennorte

Differential Revision: D15485870

fbshipit-source-id: a163ac371181dcc990093e3cd995d7dd9058b26a
2019-05-24 09:21:28 -07:00

54 lines
1.3 KiB
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 ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const ReactNativeViewViewConfig = require('ReactNativeViewViewConfig');
const verifyComponentAttributeEquivalence = require('verifyComponentAttributeEquivalence');
const PullToRefreshViewViewConfig = {
uiViewClassName: 'PullToRefreshView',
Commands: {},
bubblingEventTypes: {
...ReactNativeViewViewConfig.bubblingEventTypes,
topRefresh: {
phasedRegistrationNames: {
captured: 'onRefreshCapture',
bubbled: 'onRefresh',
},
},
},
directEventTypes: {
...ReactNativeViewViewConfig.directEventTypes,
},
validAttributes: {
...ReactNativeViewViewConfig.validAttributes,
tintColor: { process: require('processColor') },
titleColor: { process: require('processColor') },
title: true,
refreshing: true,
onRefresh: true,
},
};
verifyComponentAttributeEquivalence('PullToRefreshView', PullToRefreshViewViewConfig);
ReactNativeViewConfigRegistry.register(
'PullToRefreshView',
() => PullToRefreshViewViewConfig,
);
module.exports = 'PullToRefreshView';