mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
ac62274e56
commit
9f8305a837
@@ -0,0 +1,53 @@
|
||||
|
||||
/**
|
||||
* 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';
|
||||
Reference in New Issue
Block a user