mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Generate PullToRefreshView
Summary: Adds the codgen types and generated view config for PullToRefresh Reviewed By: TheSavior Differential Revision: D15900138 fbshipit-source-id: ee2c179317749182aaf6d3b90c8379ce06a82b9c
This commit is contained in:
committed by
Facebook Github Bot
parent
c52027baf7
commit
b063c41782
@@ -11,11 +11,10 @@
|
||||
'use strict';
|
||||
|
||||
import type {BubblingEvent, WithDefault} from '../../Types/CodegenTypes';
|
||||
import type {NativeComponent} from '../../Renderer/shims/ReactNative';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
|
||||
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
||||
|
||||
type NativeProps = $ReadOnly<{|
|
||||
...ViewProps,
|
||||
@@ -31,7 +30,7 @@ type NativeProps = $ReadOnly<{|
|
||||
/**
|
||||
* The title displayed under the refresh indicator.
|
||||
*/
|
||||
title?: ?WithDefault<string, ''>,
|
||||
title?: ?WithDefault<string, null>,
|
||||
|
||||
/**
|
||||
* Called when the view starts refreshing.
|
||||
@@ -44,10 +43,6 @@ type NativeProps = $ReadOnly<{|
|
||||
refreshing: WithDefault<boolean, false>,
|
||||
|}>;
|
||||
|
||||
// TODO: Switch this over to CodegenNativeComponent
|
||||
// once the native components are renamed in paper and fabric
|
||||
type PullToRefreshViewType = Class<NativeComponent<NativeProps>>;
|
||||
|
||||
module.exports = ((requireNativeComponent(
|
||||
'RCTRefreshControl',
|
||||
): any): PullToRefreshViewType);
|
||||
export default codegenNativeComponent<NativeProps>('PullToRefresh', {
|
||||
paperComponentName: 'RCTRefreshControl',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user