mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9f8305a837
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
54 lines
1.3 KiB
JavaScript
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';
|